Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scripts android #2138

Merged
merged 15 commits into from
Jan 15, 2025
Prev Previous commit
Next Next commit
publish abi
Signed-off-by: gtebrean <99179176+gtebrean@users.noreply.github.com>
gtebrean committed Jan 13, 2025
commit e153a6081249d5c1d3761e603eefd69c3058f09c
65 changes: 50 additions & 15 deletions abi/build.gradle
Original file line number Diff line number Diff line change
@@ -1,35 +1,70 @@
plugins {
id 'com.android.library'
id 'maven-publish'
id 'maven-publish' id 'signing'
id 'de.marcphilipp.nexus-publish'
}

publishing {
publications {
release(MavenPublication) {
groupId = group
artifactId = project.name
version = version

artifact("$buildDir/outputs/aar/${project.name}-release.aar")
maven(MavenPublication) {

pom {
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.api.allDependencies.each { dependency ->
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group)
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version)
name = project.name
description.set(project.provider({ project.description }))
url = 'https://web3j.io'

licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

scm {
def slug = project.name
if (project.hasProperty('rootProjectOverride')) {
slug = project.rootProjectOverride
}

url = "https://github.com/hyperledger-web3j/$slug"
connection = "scm:https://github.com/hyperledger-web3j/${slug}.git"
developerConnection = "scm:git://github.com/hyperledger-web3j/${slug}.git"
}

developers {
developer {
id = 'conor10'
name = 'Conor Svensson'
email = 'conor10@gmail.com'
}
}
}
}
}
}

nexusPublishing {
repositories {
mavenLocal()
sonatype {
username = System.getenv('OSSRH_USERNAME')
password = System.getenv('OSSRH_PASSWORD')
}
}
}


nexusStaging {
username System.getenv('OSSRH_USERNAME')
password System.getenv('OSSRH_PASSWORD')
packageGroup = rootProject.group
}

signing {
sign publishing.publications.maven
def gpgSecretKey = System.getenv('OSSRH_GPG_SECRET_KEY')
def password = System.getenv('OSSRH_GPG_SECRET_KEY_PASSWORD')
useInMemoryPgpKeys(gpgSecretKey, password)
}
android {
namespace "com.org.web3j"
compileSdkVersion 33
65 changes: 51 additions & 14 deletions eea/build.gradle
Original file line number Diff line number Diff line change
@@ -1,35 +1,72 @@
plugins {
id 'com.android.library' // Android library plugin for Android compatibility
id 'maven-publish'
id 'signing'
id 'de.marcphilipp.nexus-publish'
}

publishing {
publications {
release(MavenPublication) {
groupId = group
artifactId = project.name
version = version

artifact("$buildDir/outputs/aar/${project.name}-release.aar")
maven(MavenPublication) {

pom {
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.api.allDependencies.each { dependency ->
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group)
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version)
name = project.name
description.set(project.provider({ project.description }))
url = 'https://web3j.io'

licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

scm {
def slug = project.name
if (project.hasProperty('rootProjectOverride')) {
slug = project.rootProjectOverride
}

url = "https://github.com/hyperledger-web3j/$slug"
connection = "scm:https://github.com/hyperledger-web3j/${slug}.git"
developerConnection = "scm:git://github.com/hyperledger-web3j/${slug}.git"
}

developers {
developer {
id = 'conor10'
name = 'Conor Svensson'
email = 'conor10@gmail.com'
}
}
}
}
}
}

nexusPublishing {
repositories {
mavenLocal()
sonatype {
username = System.getenv('OSSRH_USERNAME')
password = System.getenv('OSSRH_PASSWORD')
}
}
}


nexusStaging {
username System.getenv('OSSRH_USERNAME')
password System.getenv('OSSRH_PASSWORD')
packageGroup = rootProject.group
}

signing {
sign publishing.publications.maven
def gpgSecretKey = System.getenv('OSSRH_GPG_SECRET_KEY')
def password = System.getenv('OSSRH_GPG_SECRET_KEY_PASSWORD')
useInMemoryPgpKeys(gpgSecretKey, password)
}

android {
namespace 'org.web3j'
compileSdkVersion 34
9 changes: 5 additions & 4 deletions gradle/publish/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "de.marcphilipp.nexus-publish"
apply plugin: 'com.android.library'

publishing {
publications {
@@ -19,14 +20,14 @@ publishing {
}

scm {
def slug = rootProject.name
def slug = project.name
if (project.hasProperty('rootProjectOverride')) {
slug = project.rootProjectOverride
}

url = "https://github.com/hyperledger/$slug"
connection = "scm:https://github.com/hyperledger/${slug}.git"
developerConnection = "scm:git://github.com/hyperledger/${slug}.git"
url = "https://github.com/hyperledger-web3j/$slug"
connection = "scm:https://github.com/hyperledger-web3j/${slug}.git"
developerConnection = "scm:git://github.com/hyperledger-web3j/${slug}.git"
}

developers {