Publish to Maven Central (#9)

* configure maven central publishing
* remove bintrayUpload argument
* use modifyPom to update artifactId
This commit is contained in:
Akinwale Ariwodola 2021-06-25 00:31:23 +01:00 committed by GitHub
parent ea15607542
commit 98d923f25c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 55 additions and 27 deletions

View file

@ -14,6 +14,7 @@ build arm64 aar:
- bin/lbrysdk-*-release__arm64.aar
expire_in: 1 week
script:
- export NEXUS_SIGNING_KEYRING_FILE=$CI_PROJECT_DIR/signing.pgp
- export PATH=/usr/bin:$PATH
- wget -q 'https://eu.crystax.net/download/crystax-ndk-10.3.2-linux-x86_64.tar.xz' -P ~/.buildozer/android/
- tar -xf ~/.buildozer/android/crystax-ndk-10.3.2-linux-x86_64.tar.xz -C ~/.buildozer/android/
@ -38,6 +39,7 @@ build arm aar:
- bin/lbrysdk-*-release__arm.aar
expire_in: 1 week
script:
- export NEXUS_SIGNING_KEYRING_FILE=$CI_PROJECT_DIR/signing.pgp
- export PATH=/usr/bin:$PATH
- wget -q 'https://eu.crystax.net/download/crystax-ndk-10.3.2-linux-x86_64.tar.xz' -P ~/.buildozer/android/
- tar -xf ~/.buildozer/android/crystax-ndk-10.3.2-linux-x86_64.tar.xz -C ~/.buildozer/android/

View file

@ -404,7 +404,10 @@ main.py that loads it.''')
android_api=android_api,
build_tools_version=build_tools_version)
render('gradle.properties', 'gradle.properties')
render(
'gradle.properties',
'gradle.properties',
env=os.environ)
# copy icon drawables
for folder in ('drawable-hdpi', 'drawable-mdpi', 'drawable-xhdpi', 'drawable-xxhdpi', 'drawable-xxxhdpi'):

View file

@ -3,11 +3,12 @@ buildscript {
repositories {
jcenter()
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.novoda:bintray-release:0.9.2'
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
}
}
@ -24,7 +25,11 @@ allprojects {
}
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'
apply plugin: 'com.bmuschko.nexus'
archivesBaseName = 'lbrysdk'
group = "io.lbry"
version = "{{ args.version }}"
android {
compileSdkVersion {{ android_api }}
@ -96,15 +101,19 @@ subprojects {
}
}
publish {
userOrg = 'lbryio'
repoName = 'io.lbry'
groupId = 'io.lbry'
artifactId = 'lbrysdk64'
publishVersion = '{{args.version}}'
licences = ['MIT']
desc = 'LBRY SDK packaged as Android AAR (64-bit)'
website = 'https://github.com/lbryio/lbry-android-sdk'
nexus {
sign = true
repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
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'
}
}
dependencies {

View file

@ -3,11 +3,12 @@ buildscript {
repositories {
jcenter()
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.novoda:bintray-release:0.9.2'
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
}
}
@ -24,7 +25,11 @@ allprojects {
}
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'
apply plugin: 'com.bmuschko.nexus'
archivesBaseName = 'lbrysdk'
group = "io.lbry"
version = "{{ args.version }}"
android {
compileSdkVersion {{ android_api }}
@ -96,15 +101,19 @@ subprojects {
}
}
publish {
userOrg = 'lbryio'
repoName = 'io.lbry'
groupId = 'io.lbry'
artifactId = 'lbrysdk32'
publishVersion = '{{args.version}}'
licences = ['MIT']
desc = 'LBRY SDK packaged as Android AAR (32-bit)'
website = 'https://github.com/lbryio/lbry-android-sdk'
nexus {
sign = true
repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
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'
}
}
dependencies {

View file

@ -1,2 +1,9 @@
android.useAndroidX=true
android.enableJetifier=true
nexusUsername={{ env["SONATYPE_USERNAME"] }}
nexusPassword={{ env["SONATYPE_PASSWORD"] }}
signing.keyId={{ env["NEXUS_SIGNING_KEY_ID"] }}
signing.password={{ env["NEXUS_SIGNING_KEY_PASSWORD"] }}
signing.secretKeyRingFile={{ env["NEXUS_SIGNING_KEYRING_FILE"] }}

View file

@ -865,9 +865,7 @@ class ToolchainCL(object):
raise BuildInterruptingException(
"Unknown build mode {} for apk()".format(args.build_mode))
output = shprint(gradlew, "--console=plain", gradle_task,
"bintrayUpload",
"-PdryRun=false",
"-Poverride=true",
"uploadArchives",
_tail=20,
_critical=True, _env=env)

BIN
signing.pgp Normal file

Binary file not shown.