From d7e6ba1ba8ef783c358299afdf5647c1628f41e7 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 25 Jun 2021 00:43:00 +0100 Subject: [PATCH 01/11] add POM details --- .../lbry/build/templates/build.tmpl.gradle | 22 +++++++++++++++++++ .../build/templates/build.tmpl.gradle.arm | 22 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle index 34d5198..b6b3fee 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle @@ -113,6 +113,28 @@ modifyPom { description 'The LBRY SDK packaged as an Android AAR' groupId 'io.lbry' artifactId 'lbrysdk64' + + scm { + url 'https://github.com/lbryio/lbry-android-sdk' + connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' + developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' + } + + licenses { + license { + name 'MIT License' + url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' + distribution 'repo' + } + } + + developers { + developer { + id 'shockr' + name 'Akinwale Ariwodola' + email 'akinwale@lbry.com' + } + } } } 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..28ab24f 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm @@ -113,6 +113,28 @@ modifyPom { description 'The LBRY SDK packaged as an Android AAR' groupId 'io.lbry' artifactId 'lbrysdk32' + + scm { + url 'https://github.com/lbryio/lbry-android-sdk' + connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' + developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' + } + + licenses { + license { + name 'MIT License' + url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' + distribution 'repo' + } + } + + developers { + developer { + id 'shockr' + name 'Akinwale Ariwodola' + email 'akinwale@lbry.com' + } + } } } -- 2.45.2 From c7272d192f160ff5c05734994c5d1d07ce4d9284 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 25 Jun 2021 01:24:39 +0100 Subject: [PATCH 02/11] set project specific modifyPom --- .../lbry/build/templates/build.tmpl.gradle | 64 +++++++++--------- .../build/templates/build.tmpl.gradle.arm | 65 ++++++++++--------- 2 files changed, 67 insertions(+), 62 deletions(-) diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle index b6b3fee..9761762 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle @@ -31,6 +31,39 @@ archivesBaseName = 'lbrysdk' group = "io.lbry" version = "{{ args.version }}" +project(':lbrysdk') { + modifyPom { + project { + name 'LBRY SDK for Android' + description 'The LBRY SDK packaged as an Android AAR' + groupId 'io.lbry' + artifactId 'lbrysdk64' + + scm { + url 'https://github.com/lbryio/lbry-android-sdk' + connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' + developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' + } + + licenses { + license { + name 'MIT License' + url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' + distribution 'repo' + } + } + + developers { + developer { + id 'shockr' + name 'Akinwale Ariwodola' + email 'akinwale@lbry.com' + } + } + } + } +} + android { compileSdkVersion {{ android_api }} buildToolsVersion '{{ build_tools_version }}' @@ -107,37 +140,6 @@ nexus { snapshotRepositoryUrl = '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' - - scm { - url 'https://github.com/lbryio/lbry-android-sdk' - connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' - developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' - } - - licenses { - license { - name 'MIT License' - url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' - distribution 'repo' - } - } - - developers { - developer { - id 'shockr' - name 'Akinwale Ariwodola' - email 'akinwale@lbry.com' - } - } - } -} - 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 28ab24f..279eb34 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm @@ -31,6 +31,40 @@ archivesBaseName = 'lbrysdk' group = "io.lbry" version = "{{ args.version }}" +project(':lbrysdk') { + modifyPom { + project { + name 'LBRY SDK for Android' + description 'The LBRY SDK packaged as an Android AAR' + url 'https://github.com/lbryio/lbry-android-sdk' + groupId 'io.lbry' + artifactId 'lbrysdk32' + + scm { + url 'https://github.com/lbryio/lbry-android-sdk' + connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' + developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' + } + + licenses { + license { + name 'MIT License' + url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' + distribution 'repo' + } + } + + developers { + developer { + id 'shockr' + name 'Akinwale Ariwodola' + email 'akinwale@lbry.com' + } + } + } + } +} + android { compileSdkVersion {{ android_api }} buildToolsVersion '{{ build_tools_version }}' @@ -107,37 +141,6 @@ nexus { snapshotRepositoryUrl = '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' - - scm { - url 'https://github.com/lbryio/lbry-android-sdk' - connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' - developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' - } - - licenses { - license { - name 'MIT License' - url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' - distribution 'repo' - } - } - - developers { - developer { - id 'shockr' - name 'Akinwale Ariwodola' - email 'akinwale@lbry.com' - } - } - } -} - dependencies { {%- for aar in aars %} compile(name: '{{ aar }}', ext: 'aar') -- 2.45.2 From 70f4183ee41af7b9dad445ebb33f5bdd5001ae3f Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 25 Jun 2021 01:44:14 +0100 Subject: [PATCH 03/11] change modifyPom position --- .../lbry/build/templates/build.tmpl.gradle | 63 +++++++++--------- .../build/templates/build.tmpl.gradle.arm | 65 +++++++++---------- 2 files changed, 61 insertions(+), 67 deletions(-) diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle index 9761762..c7873e1 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle @@ -31,39 +31,6 @@ archivesBaseName = 'lbrysdk' group = "io.lbry" version = "{{ args.version }}" -project(':lbrysdk') { - modifyPom { - project { - name 'LBRY SDK for Android' - description 'The LBRY SDK packaged as an Android AAR' - groupId 'io.lbry' - artifactId 'lbrysdk64' - - scm { - url 'https://github.com/lbryio/lbry-android-sdk' - connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' - developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' - } - - licenses { - license { - name 'MIT License' - url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' - distribution 'repo' - } - } - - developers { - developer { - id 'shockr' - name 'Akinwale Ariwodola' - email 'akinwale@lbry.com' - } - } - } - } -} - android { compileSdkVersion {{ android_api }} buildToolsVersion '{{ build_tools_version }}' @@ -130,6 +97,36 @@ subprojects { compileSdkVersion {{ android_api }} buildToolsVersion '{{ build_tools_version }}' } + modifyPom { + project { + name 'LBRY SDK for Android' + description 'The LBRY SDK packaged as an Android AAR' + groupId 'io.lbry' + artifactId 'lbrysdk64' + + scm { + url 'https://github.com/lbryio/lbry-android-sdk' + connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' + developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' + } + + licenses { + license { + name 'MIT License' + url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' + distribution 'repo' + } + } + + developers { + developer { + id 'shockr' + name 'Akinwale Ariwodola' + email 'akinwale@lbry.com' + } + } + } + } } } } 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 279eb34..3a9b1f4 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm @@ -31,40 +31,6 @@ archivesBaseName = 'lbrysdk' group = "io.lbry" version = "{{ args.version }}" -project(':lbrysdk') { - modifyPom { - project { - name 'LBRY SDK for Android' - description 'The LBRY SDK packaged as an Android AAR' - url 'https://github.com/lbryio/lbry-android-sdk' - groupId 'io.lbry' - artifactId 'lbrysdk32' - - scm { - url 'https://github.com/lbryio/lbry-android-sdk' - connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' - developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' - } - - licenses { - license { - name 'MIT License' - url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' - distribution 'repo' - } - } - - developers { - developer { - id 'shockr' - name 'Akinwale Ariwodola' - email 'akinwale@lbry.com' - } - } - } - } -} - android { compileSdkVersion {{ android_api }} buildToolsVersion '{{ build_tools_version }}' @@ -131,6 +97,37 @@ subprojects { compileSdkVersion {{ android_api }} buildToolsVersion '{{ build_tools_version }}' } + modifyPom { + project { + name 'LBRY SDK for Android' + description 'The LBRY SDK packaged as an Android AAR' + url 'https://github.com/lbryio/lbry-android-sdk' + groupId 'io.lbry' + artifactId 'lbrysdk32' + + scm { + url 'https://github.com/lbryio/lbry-android-sdk' + connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' + developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' + } + + licenses { + license { + name 'MIT License' + url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' + distribution 'repo' + } + } + + developers { + developer { + id 'shockr' + name 'Akinwale Ariwodola' + email 'akinwale@lbry.com' + } + } + } + } } } } -- 2.45.2 From ea252a99d1f502f58034803b4e828642f2112185 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 25 Jun 2021 02:16:00 +0100 Subject: [PATCH 04/11] use different plugin for maven publish --- .../lbry/build/templates/build.tmpl.gradle | 81 ++++++++++++------ .../build/templates/build.tmpl.gradle.arm | 82 +++++++++++++------ .../lbry/build/templates/gradle.properties | 5 +- 3 files changed, 113 insertions(+), 55 deletions(-) diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle index c7873e1..3791ad7 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle @@ -8,7 +8,6 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.4.2' - classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' } } @@ -24,10 +23,14 @@ allprojects { } } -apply plugin: 'com.android.library' -apply plugin: 'com.bmuschko.nexus' +plugins { + id("io.github.gradle-nexus.publish-plugin") version "1.1.0" +} + +apply plugin: 'com.android.library' +apply plugin: 'maven-publish' +apply plugin: 'signing' -archivesBaseName = 'lbrysdk' group = "io.lbry" version = "{{ args.version }}" @@ -97,44 +100,70 @@ subprojects { compileSdkVersion {{ android_api }} buildToolsVersion '{{ build_tools_version }}' } - modifyPom { - project { - name 'LBRY SDK for Android' - description 'The LBRY SDK packaged as an Android AAR' - groupId 'io.lbry' - artifactId 'lbrysdk64' - - scm { - url 'https://github.com/lbryio/lbry-android-sdk' - connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' - developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' - } - + } + } +} + +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/")) + } + } +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + groupId 'io.lbry' + artifactId 'lbrysdk64' + version {{ args.version }} + + if (project.plugins.findPlugin("com.android.library")) { + from components.release + } else { + from components.java + } + + artifact androidSourcesJar + artifact javadocJar + + 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' - distribution 'repo' + name = 'MIT License' + url = 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' } } - developers { developer { - id 'shockr' + 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' + } } } } } } -nexus { - sign = true - repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/' - snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' +signing { + sign publishing.publications } dependencies { 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 3a9b1f4..e18c8ee 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm @@ -8,7 +8,6 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.4.2' - classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' } } @@ -24,10 +23,14 @@ allprojects { } } -apply plugin: 'com.android.library' -apply plugin: 'com.bmuschko.nexus' +plugins { + id("io.github.gradle-nexus.publish-plugin") version "1.1.0" +} + +apply plugin: 'com.android.library' +apply plugin: 'maven-publish' +apply plugin: 'signing' -archivesBaseName = 'lbrysdk' group = "io.lbry" version = "{{ args.version }}" @@ -97,45 +100,70 @@ subprojects { compileSdkVersion {{ android_api }} buildToolsVersion '{{ build_tools_version }}' } - modifyPom { - project { - name 'LBRY SDK for Android' - description 'The LBRY SDK packaged as an Android AAR' - url 'https://github.com/lbryio/lbry-android-sdk' - groupId 'io.lbry' - artifactId 'lbrysdk32' - - scm { - url 'https://github.com/lbryio/lbry-android-sdk' - connection 'scm:https://github.com/lbryio/lbry-android-sdk.git' - developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git' - } - + } + } +} + +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/")) + } + } +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + groupId 'io.lbry' + artifactId 'lbrysdk32' + version {{ args.version }} + + if (project.plugins.findPlugin("com.android.library")) { + from components.release + } else { + from components.java + } + + artifact androidSourcesJar + artifact javadocJar + + 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' - distribution 'repo' + name = 'MIT License' + url = 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE' } } - developers { developer { - id 'shockr' + 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' + } } } } } } -nexus { - sign = true - repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/' - snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' +signing { + sign publishing.publications } dependencies { 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"] }} -- 2.45.2 From 707557a7522eb4910e619684c3081ae23f449831 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 25 Jun 2021 02:32:19 +0100 Subject: [PATCH 05/11] fix version string --- .../bootstraps/lbry/build/templates/build.tmpl.gradle | 2 +- .../bootstraps/lbry/build/templates/build.tmpl.gradle.arm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle index 3791ad7..d2359be 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle @@ -122,7 +122,7 @@ afterEvaluate { release(MavenPublication) { groupId 'io.lbry' artifactId 'lbrysdk64' - version {{ args.version }} + version '{{ args.version }}' if (project.plugins.findPlugin("com.android.library")) { from components.release 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 e18c8ee..4af04d7 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm @@ -122,7 +122,7 @@ afterEvaluate { release(MavenPublication) { groupId 'io.lbry' artifactId 'lbrysdk32' - version {{ args.version }} + version '{{ args.version }}' if (project.plugins.findPlugin("com.android.library")) { from components.release -- 2.45.2 From 79d7676233240f1e92d4ecfe128269ecd15d7c0f Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 25 Jun 2021 07:18:42 +0100 Subject: [PATCH 06/11] change position of plugins block --- .../bootstraps/lbry/build/templates/build.tmpl.gradle | 8 ++++---- .../bootstraps/lbry/build/templates/build.tmpl.gradle.arm | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle index d2359be..1cef3b1 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle @@ -11,6 +11,10 @@ buildscript { } } +plugins { + id("io.github.gradle-nexus.publish-plugin") version "1.1.0" +} + allprojects { repositories { jcenter() @@ -23,10 +27,6 @@ allprojects { } } -plugins { - id("io.github.gradle-nexus.publish-plugin") version "1.1.0" -} - apply plugin: 'com.android.library' apply plugin: 'maven-publish' apply plugin: 'signing' 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 4af04d7..e6a91d5 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm @@ -11,6 +11,10 @@ buildscript { } } +plugins { + id("io.github.gradle-nexus.publish-plugin") version "1.1.0" +} + allprojects { repositories { jcenter() @@ -23,9 +27,6 @@ allprojects { } } -plugins { - id("io.github.gradle-nexus.publish-plugin") version "1.1.0" -} apply plugin: 'com.android.library' apply plugin: 'maven-publish' -- 2.45.2 From f015e26965c1350267dc3587daba071420d2cc69 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 25 Jun 2021 07:37:05 +0100 Subject: [PATCH 07/11] use components.all --- .../bootstraps/lbry/build/templates/build.tmpl.gradle | 8 ++------ .../bootstraps/lbry/build/templates/build.tmpl.gradle.arm | 6 +----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle index 1cef3b1..b053d2a 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle @@ -124,12 +124,8 @@ afterEvaluate { artifactId 'lbrysdk64' version '{{ args.version }}' - if (project.plugins.findPlugin("com.android.library")) { - from components.release - } else { - from components.java - } - + from components.all + artifact androidSourcesJar artifact javadocJar 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 e6a91d5..ba5dd9c 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm @@ -125,11 +125,7 @@ afterEvaluate { artifactId 'lbrysdk32' version '{{ args.version }}' - if (project.plugins.findPlugin("com.android.library")) { - from components.release - } else { - from components.java - } + from components.all artifact androidSourcesJar artifact javadocJar -- 2.45.2 From c1611a4006304b3898bda65c0d04ce89ea3d4fa8 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 25 Jun 2021 09:17:06 +0100 Subject: [PATCH 08/11] use bundleReleaseAar artifact --- .../bootstraps/lbry/build/templates/build.tmpl.gradle | 5 ++--- .../bootstraps/lbry/build/templates/build.tmpl.gradle.arm | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle index b053d2a..f24e37f 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle @@ -124,10 +124,9 @@ afterEvaluate { artifactId 'lbrysdk64' version '{{ args.version }}' - from components.all + from components.release - artifact androidSourcesJar - artifact javadocJar + artifact bundleReleaseAar pom { name = 'LBRY SDK for Android' 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 ba5dd9c..6631e53 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm @@ -125,10 +125,9 @@ afterEvaluate { artifactId 'lbrysdk32' version '{{ args.version }}' - from components.all + from components.release - artifact androidSourcesJar - artifact javadocJar + artifact bundleReleaseAar pom { name = 'LBRY SDK for Android' -- 2.45.2 From 2ac9b3a4b55fda43ec4a43f7dd75315ef78fac90 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 25 Jun 2021 14:46:41 +0100 Subject: [PATCH 09/11] Bump Gradle version to 5.6.4. Fix pom configuration. --- build-debug.sh | 0 .../build/gradle/wrapper/gradle-wrapper.properties | 2 +- .../lbry/build/templates/build.tmpl.gradle | 14 +++++++------- .../lbry/build/templates/build.tmpl.gradle.arm | 14 +++++++------- 4 files changed, 15 insertions(+), 15 deletions(-) mode change 100644 => 100755 build-debug.sh 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 f24e37f..a74f4c3 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle @@ -7,7 +7,7 @@ buildscript { maven { url "https://jitpack.io" } } dependencies { - classpath 'com.android.tools.build:gradle:3.4.2' + classpath 'com.android.tools.build:gradle:3.6.4' } } @@ -140,16 +140,16 @@ afterEvaluate { } developers { developer { - id 'akinwale' - name 'Akinwale Ariwodola' - email 'akinwale@lbry.com' + 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' + 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' } } } 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 6631e53..10af7ee 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm @@ -7,7 +7,7 @@ buildscript { maven { url "https://jitpack.io" } } dependencies { - classpath 'com.android.tools.build:gradle:3.4.2' + classpath 'com.android.tools.build:gradle:3.6.4' } } @@ -141,16 +141,16 @@ afterEvaluate { } developers { developer { - id 'akinwale' - name 'Akinwale Ariwodola' - email 'akinwale@lbry.com' + 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' + 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' } } } -- 2.45.2 From 09c869b416ab4852268738339b3fd7f7295c49fb Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 25 Jun 2021 15:04:51 +0100 Subject: [PATCH 10/11] add publishReleasePublicationToSonatypeRepository task argument --- p4a/pythonforandroid/toolchain.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) -- 2.45.2 From 884a0ebd9dc2766c007b790e795da54f4e8ce337 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 25 Jun 2021 15:31:35 +0100 Subject: [PATCH 11/11] remove artifact directive --- .../bootstraps/lbry/build/templates/build.tmpl.gradle | 2 -- .../bootstraps/lbry/build/templates/build.tmpl.gradle.arm | 2 -- 2 files changed, 4 deletions(-) diff --git a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle index a74f4c3..ff67d1d 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle @@ -126,8 +126,6 @@ afterEvaluate { from components.release - artifact bundleReleaseAar - pom { name = 'LBRY SDK for Android' description = 'The LBRY SDK packaged as an Android 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 10af7ee..4f4a6e8 100644 --- a/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm +++ b/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm @@ -127,8 +127,6 @@ afterEvaluate { from components.release - artifact bundleReleaseAar - pom { name = 'LBRY SDK for Android' description = 'The LBRY SDK packaged as an Android AAR' -- 2.45.2