diff --git a/build-debug.sh b/build-debug.sh
old mode 100644
new mode 100755
diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/gradle/wrapper/gradle-wrapper.properties b/p4a/pythonforandroid/bootstraps/lbry/build/gradle/wrapper/gradle-wrapper.properties
index 37d166e..7f81b24 100644
--- a/p4a/pythonforandroid/bootstraps/lbry/build/gradle/wrapper/gradle-wrapper.properties
+++ b/p4a/pythonforandroid/bootstraps/lbry/build/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle
index 34d5198..ff67d1d 100644
--- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle
+++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle
@@ -7,11 +7,14 @@ buildscript {
         maven { url "https://jitpack.io" }
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.4.2'
-        classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
+        classpath 'com.android.tools.build:gradle:3.6.4'
     }
 }
 
+plugins {
+    id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
+}
+
 allprojects {
     repositories {
         jcenter()
@@ -25,9 +28,9 @@ allprojects {
 }
 
 apply plugin: 'com.android.library'
-apply plugin: 'com.bmuschko.nexus'
+apply plugin: 'maven-publish'
+apply plugin: 'signing'
 
-archivesBaseName = 'lbrysdk'
 group = "io.lbry"
 version = "{{ args.version }}"
 
@@ -101,21 +104,61 @@ subprojects {
     }
 }
 
-nexus {
-    sign = true
-    repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
-    snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
+nexusPublishing {
+    repositories {
+        sonatype {
+            stagingProfileId = sonatypeStagingProfileId
+            username = ossrhUsername
+            password = ossrhPassword
+            nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
+            snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
+        }
+    }
 }
 
-modifyPom {
-    project {
-        name 'LBRY SDK for Android'
-        description 'The LBRY SDK packaged as an Android AAR'
-        groupId 'io.lbry'
-        artifactId 'lbrysdk64'
+afterEvaluate {
+    publishing {
+        publications {
+            release(MavenPublication) {
+                groupId 'io.lbry'
+                artifactId 'lbrysdk64'
+                version '{{ args.version }}'
+
+                from components.release
+                
+                pom {
+                    name = 'LBRY SDK for Android'
+                    description = 'The LBRY SDK packaged as an Android AAR'
+                    url = 'https://github.com/lbryio/lbry-android-sdk'
+                    licenses {
+                        license {
+                            name = 'MIT License'
+                            url = 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE'
+                        }
+                    }
+                    developers {
+                        developer {
+                            id = 'akinwale'
+                            name = 'Akinwale Ariwodola'
+                            email = 'akinwale@lbry.com'
+                        }
+                    }
+
+                    scm {
+                        url = 'https://github.com/lbryio/lbry-android-sdk'
+                        connection = 'scm:git:github.com/lbryio/lbry-android-sdk.git'
+                        developerConnection = 'scm:git:ssh://github.com/lbryio/lbry-android-sdk.git'
+                    }
+                }
+            }
+        }
     }
 }
 
+signing {
+    sign publishing.publications
+}
+
 dependencies {
     {%- for aar in aars %}
     compile(name: '{{ aar }}', ext: 'aar')
diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm
index b418f27..4f4a6e8 100644
--- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm
+++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm
@@ -7,11 +7,14 @@ buildscript {
         maven { url "https://jitpack.io" }
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.4.2'
-        classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
+        classpath 'com.android.tools.build:gradle:3.6.4'
     }
 }
 
+plugins {
+    id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
+}
+
 allprojects {
     repositories {
         jcenter()
@@ -24,10 +27,11 @@ allprojects {
     }
 }
 
-apply plugin: 'com.android.library'
-apply plugin: 'com.bmuschko.nexus'
 
-archivesBaseName = 'lbrysdk'
+apply plugin: 'com.android.library'
+apply plugin: 'maven-publish'
+apply plugin: 'signing'
+
 group = "io.lbry"
 version = "{{ args.version }}"
 
@@ -101,21 +105,61 @@ subprojects {
     }
 }
 
-nexus {
-    sign = true
-    repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
-    snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
+nexusPublishing {
+    repositories {
+        sonatype {
+            stagingProfileId = sonatypeStagingProfileId
+            username = ossrhUsername
+            password = ossrhPassword
+            nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
+            snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
+        }
+    }
 }
 
-modifyPom {
-    project {
-        name 'LBRY SDK for Android'
-        description 'The LBRY SDK packaged as an Android AAR'
-        groupId 'io.lbry'
-        artifactId 'lbrysdk32'
+afterEvaluate {
+    publishing {
+        publications {
+            release(MavenPublication) {
+                groupId 'io.lbry'
+                artifactId 'lbrysdk32'
+                version '{{ args.version }}'
+
+                from components.release
+
+                pom {
+                    name = 'LBRY SDK for Android'
+                    description = 'The LBRY SDK packaged as an Android AAR'
+                    url = 'https://github.com/lbryio/lbry-android-sdk'
+                    licenses {
+                        license {
+                            name = 'MIT License'
+                            url = 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE'
+                        }
+                    }
+                    developers {
+                        developer {
+                            id = 'akinwale'
+                            name = 'Akinwale Ariwodola'
+                            email = 'akinwale@lbry.com'
+                        }
+                    }
+
+                    scm {
+                        url = 'https://github.com/lbryio/lbry-android-sdk'
+                        connection = 'scm:git:github.com/lbryio/lbry-android-sdk.git'
+                        developerConnection = 'scm:git:ssh://github.com/lbryio/lbry-android-sdk.git'
+                    }
+                }
+            }
+        }
     }
 }
 
+signing {
+    sign publishing.publications
+}
+
 dependencies {
     {%- for aar in aars %}
     compile(name: '{{ aar }}', ext: 'aar')
diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/gradle.properties b/p4a/pythonforandroid/bootstraps/lbry/build/templates/gradle.properties
index f7a8396..88524aa 100644
--- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/gradle.properties
+++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/gradle.properties
@@ -1,8 +1,9 @@
 android.useAndroidX=true
 android.enableJetifier=true
 
-nexusUsername={{ env["SONATYPE_USERNAME"] }}
-nexusPassword={{ env["SONATYPE_PASSWORD"] }}
+ossrhUsername={{ env["SONATYPE_USERNAME"] }}
+ossrhPassword={{ env["SONATYPE_PASSWORD"] }}
+sonatypeStagingProfileId={{ env["SONATYPE_STAGING_PROFILE_ID"] }}
 
 signing.keyId={{ env["NEXUS_SIGNING_KEY_ID"] }}
 signing.password={{ env["NEXUS_SIGNING_KEY_PASSWORD"] }}
diff --git a/p4a/pythonforandroid/toolchain.py b/p4a/pythonforandroid/toolchain.py
index a310723..ddf745a 100644
--- a/p4a/pythonforandroid/toolchain.py
+++ b/p4a/pythonforandroid/toolchain.py
@@ -845,8 +845,6 @@ class ToolchainCL(object):
                 # gradle-based build
                 env["ANDROID_NDK_HOME"] = self.ctx.ndk_dir
                 env["ANDROID_HOME"] = self.ctx.sdk_dir
-                env["ORG_GRADLE_PROJECT_bintrayUser"] = environ.get("BINTRAY_USER")
-                env["ORG_GRADLE_PROJECT_bintrayKey"] = environ.get("BINTRAY_KEY")
 
                 gradlew = sh.Command('./gradlew')
                 if exists('/usr/bin/dos2unix'):
@@ -865,7 +863,7 @@ class ToolchainCL(object):
                     raise BuildInterruptingException(
                         "Unknown build mode {} for apk()".format(args.build_mode))
                 output = shprint(gradlew, "--console=plain", gradle_task,
-                                 "uploadArchives",
+                                 "publishReleasePublicationToSonatypeRepository",
                                  _tail=20,
                                  _critical=True, _env=env)