Maven Central publishing - set POM properties #10
3 changed files with 113 additions and 55 deletions
|
@ -8,7 +8,6 @@ buildscript {
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.4.2'
|
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'
|
plugins {
|
||||||
apply plugin: 'com.bmuschko.nexus'
|
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"
|
group = "io.lbry"
|
||||||
version = "{{ args.version }}"
|
version = "{{ args.version }}"
|
||||||
|
|
||||||
|
@ -97,44 +100,70 @@ subprojects {
|
||||||
compileSdkVersion {{ android_api }}
|
compileSdkVersion {{ android_api }}
|
||||||
buildToolsVersion '{{ build_tools_version }}'
|
buildToolsVersion '{{ build_tools_version }}'
|
||||||
}
|
}
|
||||||
modifyPom {
|
}
|
||||||
project {
|
}
|
||||||
name 'LBRY SDK for Android'
|
}
|
||||||
description 'The LBRY SDK packaged as an Android AAR'
|
|
||||||
groupId 'io.lbry'
|
nexusPublishing {
|
||||||
artifactId 'lbrysdk64'
|
repositories {
|
||||||
|
sonatype {
|
||||||
scm {
|
stagingProfileId = sonatypeStagingProfileId
|
||||||
url 'https://github.com/lbryio/lbry-android-sdk'
|
username = ossrhUsername
|
||||||
connection 'scm:https://github.com/lbryio/lbry-android-sdk.git'
|
password = ossrhPassword
|
||||||
developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git'
|
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 {
|
licenses {
|
||||||
license {
|
license {
|
||||||
name 'MIT License'
|
name = 'MIT License'
|
||||||
url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE'
|
url = 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE'
|
||||||
distribution 'repo'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
developers {
|
developers {
|
||||||
developer {
|
developer {
|
||||||
id 'shockr'
|
id 'akinwale'
|
||||||
name 'Akinwale Ariwodola'
|
name 'Akinwale Ariwodola'
|
||||||
email 'akinwale@lbry.com'
|
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 {
|
signing {
|
||||||
sign = true
|
sign publishing.publications
|
||||||
repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
|
||||||
snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -8,7 +8,6 @@ buildscript {
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.4.2'
|
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'
|
plugins {
|
||||||
apply plugin: 'com.bmuschko.nexus'
|
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"
|
group = "io.lbry"
|
||||||
version = "{{ args.version }}"
|
version = "{{ args.version }}"
|
||||||
|
|
||||||
|
@ -97,45 +100,70 @@ subprojects {
|
||||||
compileSdkVersion {{ android_api }}
|
compileSdkVersion {{ android_api }}
|
||||||
buildToolsVersion '{{ build_tools_version }}'
|
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'
|
nexusPublishing {
|
||||||
groupId 'io.lbry'
|
repositories {
|
||||||
artifactId 'lbrysdk32'
|
sonatype {
|
||||||
|
stagingProfileId = sonatypeStagingProfileId
|
||||||
scm {
|
username = ossrhUsername
|
||||||
url 'https://github.com/lbryio/lbry-android-sdk'
|
password = ossrhPassword
|
||||||
connection 'scm:https://github.com/lbryio/lbry-android-sdk.git'
|
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
|
||||||
developerConnection 'scm:git://github.com/lbryio/lbry-android-sdk.git'
|
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 {
|
licenses {
|
||||||
license {
|
license {
|
||||||
name 'MIT License'
|
name = 'MIT License'
|
||||||
url 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE'
|
url = 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE'
|
||||||
distribution 'repo'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
developers {
|
developers {
|
||||||
developer {
|
developer {
|
||||||
id 'shockr'
|
id 'akinwale'
|
||||||
name 'Akinwale Ariwodola'
|
name 'Akinwale Ariwodola'
|
||||||
email 'akinwale@lbry.com'
|
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 {
|
signing {
|
||||||
sign = true
|
sign publishing.publications
|
||||||
repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
|
||||||
snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -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"] }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue