Skip to content

Commit

Permalink
back to old publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
doxthree committed Jan 31, 2025
1 parent 6cf9eb2 commit 74ff4cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
uses: gradle/gradle-build-action@v3
with:
arguments: publishToMavenCentral
arguments: publish
gradle-version: "8.6"
build-root-directory: java

Expand Down
34 changes: 8 additions & 26 deletions java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ dependencies {
implementation 'org.jetbrains:annotations:26.0.1'
implementation 'io.github.cdimascio:dotenv-java:3.1.0'
implementation 'com.ibm.async:asyncutil:0.1.0'
implementation 'com.amazonaws:aws-java-sdk-s3:1.12.780'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.2'
implementation 'io.github.cdimascio:dotenv-java:2.2.0'
testImplementation 'org.testng:testng:7.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
testImplementation 'org.mockito:mockito-core:5.14.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.11.3'
testImplementation 'com.amazonaws:aws-java-sdk-s3:1.12.780'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.4'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.4'

Expand Down Expand Up @@ -70,7 +71,6 @@ tasks.register('testWithoutErrorLogProducer', Test) {
publishing {
publications {
mavenJava(MavenPublication) {

pom {
name = 'G DATA VaaS'
description = 'Verdict-as-a-Service (VaaS) is a service that provides a platform for scanning files for malware and other threats. It allows easy integration in your application. With a few lines of code, you can start scanning files for malware.'
Expand All @@ -92,40 +92,22 @@ publishing {
connection = 'scm:git:[email protected]:GDATASoftwareAG/vaas.git'
url = 'https://github.com/GDATASoftwareAG/vaas'
}

from components.java
}
}
}

signing {
if (findProperty("signingKey") != null && findProperty("signingPassword") != null) {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
} else {
logger.lifecycle("Skipping signing as this is not a release build or no signing credentials are provided.")
}
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}


repositories {
maven {
url = layout.buildDirectory.dir('repos/releases')
}
}
}

tasks.register('publishToLocalMaven') {
group = 'publishing'
description = 'Publish the library to the local Maven repository (~/.m2/repository).'

dependsOn 'publishMavenJavaPublicationToMavenLocal'
}

tasks.register('publishToMavenCentral') {
group = 'publishing'
description = 'Publish the library to Maven Central.'

dependsOn 'publishMavenJavaPublicationToMavenRepository'
}
}

0 comments on commit 74ff4cf

Please sign in to comment.