diff --git a/tor-android-binary/build.gradle b/tor-android-binary/build.gradle
index 90713c7e293a250b8e19c33e91760150fc500191..036c940cf65272b4e2379a3431169d23798d804d 100644
--- a/tor-android-binary/build.gradle
+++ b/tor-android-binary/build.gradle
@@ -11,12 +11,12 @@ def getVersionName = { ->
 }
 
 android {
-    compileSdkVersion 30
-    buildToolsVersion '30.0.3'
+    compileSdkVersion 31
+    buildToolsVersion '31.0.0'
 
     defaultConfig {
         minSdkVersion 16
-        targetSdkVersion 30
+        targetSdkVersion 31
         versionCode 41500
         versionName getVersionName()
 
@@ -83,10 +83,19 @@ task sourcesJar(type: Jar) {
     baseName = 'tor-android-' + getVersionName()
 }
 
+configurations {
+    libconfiguration
+    // declare a configuration that is going to resolve the compile classpath of the application
+    compileClasspath.extendsFrom(libconfiguration)
+
+    // declare a configuration that is going to resolve the runtime classpath of the application
+    runtimeClasspath.extendsFrom(libconfiguration)
+}
+
 task javadoc(type: Javadoc) {
     source = android.sourceSets.main.java.srcDirs
     classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
-    classpath += configurations.compile
+    classpath += configurations.libconfiguration
     options.noTimestamp = true
     options.addStringOption('charset', 'UTF-8') // to match Maven's case
     android.libraryVariants.all { variant ->
@@ -105,17 +114,5 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
 }
 
 
-apply plugin: 'maven'
-
-uploadArchives {
-    repositories.mavenDeployer {
-        def deployPath = file(getProperty('aar.deployPath'))
-        repository(url: "file://${deployPath.absolutePath}")
-        pom.project {
-            groupId 'info.guardianproject'
-            artifactId 'tor-android'
-            version getVersionName()
-        }
-    }
-}
+apply plugin: 'maven-publish'