Publish to Maven Central (#9)
* configure maven central publishing * remove bintrayUpload argument * use modifyPom to update artifactId
This commit is contained in:
parent
ea15607542
commit
98d923f25c
7 changed files with 55 additions and 27 deletions
|
@ -14,6 +14,7 @@ build arm64 aar:
|
||||||
- bin/lbrysdk-*-release__arm64.aar
|
- bin/lbrysdk-*-release__arm64.aar
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
script:
|
script:
|
||||||
|
- export NEXUS_SIGNING_KEYRING_FILE=$CI_PROJECT_DIR/signing.pgp
|
||||||
- export PATH=/usr/bin:$PATH
|
- 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/
|
- 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/
|
- 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
|
- bin/lbrysdk-*-release__arm.aar
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
script:
|
script:
|
||||||
|
- export NEXUS_SIGNING_KEYRING_FILE=$CI_PROJECT_DIR/signing.pgp
|
||||||
- export PATH=/usr/bin:$PATH
|
- 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/
|
- 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/
|
- tar -xf ~/.buildozer/android/crystax-ndk-10.3.2-linux-x86_64.tar.xz -C ~/.buildozer/android/
|
||||||
|
|
|
@ -404,7 +404,10 @@ main.py that loads it.''')
|
||||||
android_api=android_api,
|
android_api=android_api,
|
||||||
build_tools_version=build_tools_version)
|
build_tools_version=build_tools_version)
|
||||||
|
|
||||||
render('gradle.properties', 'gradle.properties')
|
render(
|
||||||
|
'gradle.properties',
|
||||||
|
'gradle.properties',
|
||||||
|
env=os.environ)
|
||||||
|
|
||||||
# copy icon drawables
|
# copy icon drawables
|
||||||
for folder in ('drawable-hdpi', 'drawable-mdpi', 'drawable-xhdpi', 'drawable-xxhdpi', 'drawable-xxxhdpi'):
|
for folder in ('drawable-hdpi', 'drawable-mdpi', 'drawable-xhdpi', 'drawable-xxhdpi', 'drawable-xxxhdpi'):
|
||||||
|
|
|
@ -3,11 +3,12 @@ buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
google()
|
google()
|
||||||
|
mavenCentral()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.4.2'
|
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.android.library'
|
||||||
apply plugin: 'com.novoda.bintray-release'
|
apply plugin: 'com.bmuschko.nexus'
|
||||||
|
|
||||||
|
archivesBaseName = 'lbrysdk'
|
||||||
|
group = "io.lbry"
|
||||||
|
version = "{{ args.version }}"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion {{ android_api }}
|
compileSdkVersion {{ android_api }}
|
||||||
|
@ -96,15 +101,19 @@ subprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
publish {
|
nexus {
|
||||||
userOrg = 'lbryio'
|
sign = true
|
||||||
repoName = 'io.lbry'
|
repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||||
groupId = 'io.lbry'
|
snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
||||||
artifactId = 'lbrysdk64'
|
}
|
||||||
publishVersion = '{{args.version}}'
|
|
||||||
licences = ['MIT']
|
modifyPom {
|
||||||
desc = 'LBRY SDK packaged as Android AAR (64-bit)'
|
project {
|
||||||
website = 'https://github.com/lbryio/lbry-android-sdk'
|
name 'LBRY SDK for Android'
|
||||||
|
description 'The LBRY SDK packaged as an Android AAR'
|
||||||
|
groupId 'io.lbry'
|
||||||
|
artifactId 'lbrysdk64'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -3,11 +3,12 @@ buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
google()
|
google()
|
||||||
|
mavenCentral()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.4.2'
|
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.android.library'
|
||||||
apply plugin: 'com.novoda.bintray-release'
|
apply plugin: 'com.bmuschko.nexus'
|
||||||
|
|
||||||
|
archivesBaseName = 'lbrysdk'
|
||||||
|
group = "io.lbry"
|
||||||
|
version = "{{ args.version }}"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion {{ android_api }}
|
compileSdkVersion {{ android_api }}
|
||||||
|
@ -96,15 +101,19 @@ subprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
publish {
|
nexus {
|
||||||
userOrg = 'lbryio'
|
sign = true
|
||||||
repoName = 'io.lbry'
|
repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||||
groupId = 'io.lbry'
|
snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
||||||
artifactId = 'lbrysdk32'
|
}
|
||||||
publishVersion = '{{args.version}}'
|
|
||||||
licences = ['MIT']
|
modifyPom {
|
||||||
desc = 'LBRY SDK packaged as Android AAR (32-bit)'
|
project {
|
||||||
website = 'https://github.com/lbryio/lbry-android-sdk'
|
name 'LBRY SDK for Android'
|
||||||
|
description 'The LBRY SDK packaged as an Android AAR'
|
||||||
|
groupId 'io.lbry'
|
||||||
|
artifactId 'lbrysdk32'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -1,2 +1,9 @@
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=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"] }}
|
||||||
|
|
|
@ -865,9 +865,7 @@ class ToolchainCL(object):
|
||||||
raise BuildInterruptingException(
|
raise BuildInterruptingException(
|
||||||
"Unknown build mode {} for apk()".format(args.build_mode))
|
"Unknown build mode {} for apk()".format(args.build_mode))
|
||||||
output = shprint(gradlew, "--console=plain", gradle_task,
|
output = shprint(gradlew, "--console=plain", gradle_task,
|
||||||
"bintrayUpload",
|
"uploadArchives",
|
||||||
"-PdryRun=false",
|
|
||||||
"-Poverride=true",
|
|
||||||
_tail=20,
|
_tail=20,
|
||||||
_critical=True, _env=env)
|
_critical=True, _env=env)
|
||||||
|
|
||||||
|
|
BIN
signing.pgp
Normal file
BIN
signing.pgp
Normal file
Binary file not shown.
Loading…
Reference in a new issue