Maven Central publishing - set POM properties #10
6 changed files with 121 additions and 35 deletions
0
build-debug.sh
Normal file → Executable file
0
build-debug.sh
Normal file → Executable file
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
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
|
||||||
|
|
|
@ -7,11 +7,14 @@ buildscript {
|
||||||
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.6.4'
|
||||||
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
|
||||||
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
|
@ -25,9 +28,9 @@ allprojects {
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'com.bmuschko.nexus'
|
apply plugin: 'maven-publish'
|
||||||
|
apply plugin: 'signing'
|
||||||
|
|
||||||
archivesBaseName = 'lbrysdk'
|
|
||||||
group = "io.lbry"
|
group = "io.lbry"
|
||||||
version = "{{ args.version }}"
|
version = "{{ args.version }}"
|
||||||
|
|
||||||
|
@ -101,20 +104,60 @@ subprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nexus {
|
nexusPublishing {
|
||||||
sign = true
|
repositories {
|
||||||
repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
sonatype {
|
||||||
snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
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 {
|
afterEvaluate {
|
||||||
project {
|
publishing {
|
||||||
name 'LBRY SDK for Android'
|
publications {
|
||||||
description 'The LBRY SDK packaged as an Android AAR'
|
release(MavenPublication) {
|
||||||
groupId 'io.lbry'
|
groupId 'io.lbry'
|
||||||
artifactId 'lbrysdk64'
|
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 {
|
dependencies {
|
||||||
{%- for aar in aars %}
|
{%- for aar in aars %}
|
||||||
|
|
|
@ -7,11 +7,14 @@ buildscript {
|
||||||
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.6.4'
|
||||||
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
|
||||||
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
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"
|
group = "io.lbry"
|
||||||
version = "{{ args.version }}"
|
version = "{{ args.version }}"
|
||||||
|
|
||||||
|
@ -101,20 +105,60 @@ subprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nexus {
|
nexusPublishing {
|
||||||
sign = true
|
repositories {
|
||||||
repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
sonatype {
|
||||||
snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
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 {
|
afterEvaluate {
|
||||||
project {
|
publishing {
|
||||||
name 'LBRY SDK for Android'
|
publications {
|
||||||
description 'The LBRY SDK packaged as an Android AAR'
|
release(MavenPublication) {
|
||||||
groupId 'io.lbry'
|
groupId 'io.lbry'
|
||||||
artifactId 'lbrysdk32'
|
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 {
|
dependencies {
|
||||||
{%- for aar in aars %}
|
{%- for aar in aars %}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
|
||||||
nexusUsername={{ env["SONATYPE_USERNAME"] }}
|
ossrhUsername={{ env["SONATYPE_USERNAME"] }}
|
||||||
nexusPassword={{ env["SONATYPE_PASSWORD"] }}
|
ossrhPassword={{ env["SONATYPE_PASSWORD"] }}
|
||||||
|
sonatypeStagingProfileId={{ env["SONATYPE_STAGING_PROFILE_ID"] }}
|
||||||
|
|
||||||
signing.keyId={{ env["NEXUS_SIGNING_KEY_ID"] }}
|
signing.keyId={{ env["NEXUS_SIGNING_KEY_ID"] }}
|
||||||
signing.password={{ env["NEXUS_SIGNING_KEY_PASSWORD"] }}
|
signing.password={{ env["NEXUS_SIGNING_KEY_PASSWORD"] }}
|
||||||
|
|
|
@ -845,8 +845,6 @@ class ToolchainCL(object):
|
||||||
# gradle-based build
|
# gradle-based build
|
||||||
env["ANDROID_NDK_HOME"] = self.ctx.ndk_dir
|
env["ANDROID_NDK_HOME"] = self.ctx.ndk_dir
|
||||||
env["ANDROID_HOME"] = self.ctx.sdk_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')
|
gradlew = sh.Command('./gradlew')
|
||||||
if exists('/usr/bin/dos2unix'):
|
if exists('/usr/bin/dos2unix'):
|
||||||
|
@ -865,7 +863,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,
|
||||||
"uploadArchives",
|
"publishReleasePublicationToSonatypeRepository",
|
||||||
_tail=20,
|
_tail=20,
|
||||||
_critical=True, _env=env)
|
_critical=True, _env=env)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue