Skip to content

Commit

Permalink
fix gradle checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
Hillelmed committed Apr 9, 2024
1 parent a2d8909 commit 4f8151d
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'java'
id 'jacoco'
id 'maven-publish'
id 'signing'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

Expand Down Expand Up @@ -51,6 +52,15 @@ tasks.withType(JavaCompile).configureEach {
options.compilerArgs.add("-parameters")
options.compilerArgs += ["-Xlint:-options"]
}
tasks.withType(Jar) { task ->
task.doLast {
ant.checksum algorithm: 'md5', file: it.archivePath
ant.checksum algorithm: 'sha1', file: it.archivePath
ant.checksum algorithm: 'sha-256', file: it.archivePath, fileext: '.sha256'
ant.checksum algorithm: 'sha-512', file: it.archivePath, fileext: '.sha512'
}
}


test {
useTestNG()
Expand Down Expand Up @@ -95,7 +105,10 @@ jacocoTestReport {
html.required = true
}
}

java {
withJavadocJar()
withSourcesJar()
}
javadoc {
source = sourceSets.main.allJava
options.with {
Expand Down Expand Up @@ -144,16 +157,27 @@ publishing {

}
}
repositories {
maven {
// change URLs to point to your repos, e.g. http://my.org/repo
def releasesRepoUrl = layout.buildDirectory.dir('repos/releases')
def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots')
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/hillelmed/jenkins-client-java"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
username = 'here'
password = 'here'
}
}

}

}
signing {
sign configurations.archives
}

0 comments on commit 4f8151d

Please sign in to comment.