Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/maven-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ runs:
env:
JAVA_HOME: ${{ env.JAVA_HOME }}

- name: Publish Android/Java Packages to Maven
- name: Publish Java Packages to Maven
shell: bash
run: ./gradlew publish -PisSnapshot=false --stacktrace
run: ./gradlew publishToSonatype closeSonatypeStagingRepository -PisSnapshot=false --stacktrace
env:
JAVA_HOME: ${{ env.JAVA_HOME }}
MAVEN_USERNAME: ${{ inputs.ossr-username }}
Expand Down
File renamed without changes.
12 changes: 8 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ jobs:
with:
distribution: temurin
java-version: 11
- uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c
with:
arguments: assemble apiDiff check jacocoTestReport --continue --console=plain
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d

- name: Set up Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1

- name: Test and Assemble and ApiDiff with Gradle
run: ./gradlew assemble apiDiff check jacocoTestReport --continue --console=plain

- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7
with:
flags: unittests
- uses: actions/upload-artifact@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: gradle/wrapper-validation-action@8d49e559aae34d3e0eb16cde532684bc9702762b # pin@v1.0.6
- uses: gradle/actions/wrapper-validation@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # pin@v5.0.0
9 changes: 5 additions & 4 deletions .github/workflows/rl-secure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ jobs:
distribution: temurin
java-version: ${{ inputs.java-version }}

- name: Build with Gradle
uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c
with:
arguments: assemble apiDiff check jacocoTestReport --continue --console=plain
- name: Set up Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1

- name: Test and Assemble and ApiDiff with Gradle
run: ./gradlew assemble apiDiff check jacocoTestReport --continue --console=plain

- name: Get Artifact Version
id: get_version
Expand Down
15 changes: 14 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
}

allprojects {
group = 'com.auth0'
Expand All @@ -7,3 +9,14 @@ allprojects {
mavenCentral()
}
}

nexusPublishing {
repositories {
sonatype {
nexusUrl = uri('https://ossrh-staging-api.central.sonatype.com/service/local/')
snapshotRepositoryUrl = uri('https://central.sonatype.com/repository/maven-snapshots/')
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
35 changes: 5 additions & 30 deletions gradle/maven-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,18 @@ artifacts {
archives sourcesJar, javadocJar
}


final releaseRepositoryUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
final snapshotRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/"

publishing {
publications {
mavenJava(MavenPublication) {
from components.java

groupId = GROUP
artifactId = POM_ARTIFACT_ID
version = getVersionName()

artifact("$buildDir/libs/${project.name}-${version}.jar")
artifact sourcesJar
artifact javadocJar

groupId = GROUP
artifactId = POM_ARTIFACT_ID
version = project.version

pom {
name = POM_NAME
packaging = POM_PACKAGING
Expand Down Expand Up @@ -68,27 +64,6 @@ publishing {
connection = POM_SCM_CONNECTION
developerConnection = POM_SCM_DEV_CONNECTION
}

pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')

project.configurations.implementation.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
repositories {
maven {
name = "sonatype"
url = version.endsWith('SNAPSHOT') ? snapshotRepositoryUrl : releaseRepositoryUrl
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
id 'jacoco'
id 'checkstyle'
id 'me.champeau.gradle.japicmp' version '0.4.1'
id 'maven-publish'
}

sourceSets {
Expand Down