diff --git a/build.gradle b/build.gradle
index 469c3595375ec5964d2ad7aa93b01e77c4c53879..444eb45519cd072f1cd01585cace2c8a158e6af5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -22,7 +22,7 @@ allprojects {
 }
 
 ext {
-    libvlcVersion = '4.0.0-eap11'
+    libvlcVersion = '4.0.0-eap12'
     minSdkVersion = 17
     targetSdkVersion = 30
     compileSdkVersion = 31
diff --git a/libvlc/build.gradle b/libvlc/build.gradle
index 9c358555ce0a2d6b140a525fcaf8eaaac348c8d0..53c9ba7cd3c7ceaec8180eb14ec6245560913ada 100644
--- a/libvlc/build.gradle
+++ b/libvlc/build.gradle
@@ -114,4 +114,4 @@ def vlcRevision() {
     return vlc.toString()
 }
 
-if (rootProject.hasProperty('publishScriptPath')) apply from: "$rootProject.ext.publishScriptPath"
\ No newline at end of file
+apply from: "../publish.gradle"
\ No newline at end of file
diff --git a/publish.gradle b/publish.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..41518d4781bfd1607d0d29d0b39b51b8e3152e13
--- /dev/null
+++ b/publish.gradle
@@ -0,0 +1,28 @@
+
+group = 'org.videolan.android'
+version = library_version
+
+def siteUrl = 'https://code.videolan.org/videolan/libvlcjni/'
+def gitUrl = 'https://code.videolan.org/videolan/libvlcjni.git'
+
+def licenseName = 'GNU Lesser General Public License, version 2.1'
+def licenseUrl = 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html'
+def allLicenses = ["LGPL-2.1"]
+
+task sourcesJar(type: Jar) {
+    from android.sourceSets.main.java.srcDirs
+}
+
+task javadoc(type: Javadoc) {
+    source = android.sourceSets.main.java.srcDirs
+    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
+}
+
+task javadocJar(type: Jar, dependsOn: javadoc) {
+    from javadoc.destinationDir
+}
+
+artifacts {
+    archives javadocJar
+    archives sourcesJar
+}
\ No newline at end of file