-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad87db9
commit 3256f53
Showing
4 changed files
with
142 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: SSHJ Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
java12: | ||
name: Build with Java 12 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up JDK 12 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 12 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew check | ||
release: | ||
name: Release | ||
needs: [java12] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 12 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Release | ||
run: ./gradlew release -Prelease.disableChecks -Prelease.pushTagsOnly -Prelease.customUsername=${{ github.actor }} -Prelease.customPassword=${{ github.token }} | ||
env: | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNINGKEY }} | ||
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNINGKEYID }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNINGPASSWORD }} | ||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} | ||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,18 +6,22 @@ plugins { | |
id "java" | ||
id "groovy" | ||
id "jacoco" | ||
id "com.github.blindpirate.osgi" version '0.0.3' | ||
id "com.github.blindpirate.osgi" version '0.0.6' | ||
id "maven-publish" | ||
id 'pl.allegro.tech.build.axion-release' version '1.11.0' | ||
id "com.bmuschko.docker-remote-api" version "6.4.0" | ||
id "com.github.hierynomus.license" version "0.12.1" | ||
id "com.jfrog.bintray" version "1.8.5" | ||
id 'ru.vyarus.java-lib' version '1.0.5' | ||
// id 'ru.vyarus.pom' version '1.0.3' | ||
id 'ru.vyarus.github-info' version '1.1.0' | ||
id "signing" | ||
id 'pl.allegro.tech.build.axion-release' version '1.13.3' | ||
id "com.bmuschko.docker-remote-api" version "7.1.0" | ||
id "com.github.hierynomus.license" version "0.16.1" | ||
id 'ru.vyarus.github-info' version '1.2.0' | ||
id "io.github.gradle-nexus.publish-plugin" version "1.0.0" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
group = "com.hierynomus" | ||
defaultTasks ["build"] | ||
ext.moduleName = "${project.group}.${project.name}" | ||
|
||
scmVersion { | ||
|
@@ -33,13 +37,7 @@ scmVersion { | |
|
||
project.version = scmVersion.version | ||
|
||
defaultTasks "build" | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
configurations.compile.transitive = false | ||
configurations.implementation.transitive = false | ||
|
||
def bouncycastleVersion = "1.69" | ||
def sshdVersion = "2.1.0" | ||
|
@@ -85,7 +83,6 @@ if (JavaVersion.current().isJava8Compatible()) { | |
} | ||
} | ||
|
||
|
||
compileJava { | ||
options.compilerArgs.addAll(['--release', '7']) | ||
} | ||
|
@@ -123,6 +120,12 @@ jar { | |
} | ||
} | ||
|
||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
sourcesJar { | ||
manifest { | ||
attributes( | ||
|
@@ -188,71 +191,82 @@ github { | |
license 'Apache' | ||
} | ||
|
||
pom { | ||
description "SSHv2 library for Java" | ||
url "https://github.com/hierynomus/sshj" | ||
inceptionYear "2009" | ||
developers { | ||
developer { | ||
id "hierynomus" | ||
name "Jeroen van Erp" | ||
email "[email protected]" | ||
roles { | ||
role "Lead developer" | ||
} | ||
} | ||
developer { | ||
id "shikhar" | ||
name "Shikhar Bhushan" | ||
email "[email protected]" | ||
url "http://schmizz.net" | ||
roles { | ||
role "Previous lead developer" | ||
} | ||
} | ||
developer { | ||
id "iterate" | ||
name "David Kocher" | ||
email "[email protected]" | ||
organization "iterage GmbH" | ||
organizationUrl "https://iterate.ch" | ||
roles { | ||
role "Developer" | ||
} | ||
} | ||
} | ||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
from(components.java) | ||
} | ||
} | ||
} | ||
|
||
if (project.hasProperty("bintrayUsername") && project.hasProperty("bintrayApiKey")) { | ||
bintray { | ||
user = project.property("bintrayUsername") | ||
key = project.property("bintrayApiKey") | ||
publish = true | ||
publications = ["maven"] | ||
pkg { | ||
repo = "maven" | ||
name = "${project.name}" | ||
licenses = ["Apache-2.0"] | ||
vcsUrl = "https://github.com/hierynomus/sshj.git" | ||
labels = ["ssh", "sftp", "secure-shell", "network", "file-transfer"] | ||
githubRepo = "hierynomus/sshj" | ||
version { | ||
name = "${project.version}" | ||
vcsTag = "v${project.version}" | ||
released = new SimpleDateFormat('yyyy-MM-dd\'T\'HH:mm:ss.SSSZZ').format(new Date()) | ||
gpg { | ||
sign = true | ||
passphrase = project.property("signing.password") | ||
} | ||
mavenCentralSync { | ||
sync = true | ||
user = project.property("sonatypeUsername") | ||
password = project.property("sonatypePassword") | ||
close = 1 | ||
project.signing { | ||
required { project.gradle.taskGraph.hasTask("release") } | ||
sign publishing.publications.maven | ||
|
||
if (project.hasProperty("signingKeyId") || project.hasProperty("signingKey")) { | ||
def signingKeyId = project.findProperty("signingKeyId") | ||
def signingKey = project.findProperty("signingKey") | ||
def signingPassword = project.findProperty("signingPassword") | ||
if (signingKeyId) { | ||
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) | ||
} else if (signingKey) { | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
} | ||
} | ||
} | ||
|
||
project.plugins.withType(MavenPublishPlugin).all { | ||
PublishingExtension publishing = project.extensions.getByType(PublishingExtension) | ||
publishing.publications.withType(MavenPublication).all { mavenPublication -> | ||
mavenPublication.pom { | ||
name = "${project.name}" | ||
description = 'SSHv2 library for Java' | ||
inceptionYear = '2009' | ||
url = "https://github.com/hierynomus/${project.name}" | ||
licenses { | ||
license { | ||
name = "The Apache License, Version 2.0" | ||
url = "https://www.apache.org/licenses/LICENSE-2.0" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = "hierynomus" | ||
name = "Jeroen van Erp" | ||
email = "[email protected]" | ||
} | ||
developer { | ||
id = "shikhar" | ||
name = "Shikhar Bhushan" | ||
email = "[email protected]" | ||
url = "http://schmizz.net" | ||
roles = ["Previous Lead developer"] | ||
} | ||
developer { | ||
id = "iterate" | ||
name = "David Kocher" | ||
email = "[email protected]" | ||
organization = "iterate GmbH" | ||
organizationUrl = "https://iterate.ch" | ||
roles = ["Developer"] | ||
} | ||
} | ||
scm { | ||
url = "https://github.com/hierynomus/${project.name}" | ||
connection = "scm:[email protected]:hierynomus/${project.name}.git" | ||
developerConnection = "scm:[email protected]:hierynomus/${project.name}.git" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype() //sonatypeUsername and sonatypePassword properties are used automatically | ||
} | ||
|
||
connectTimeout = Duration.ofMinutes(3) | ||
clientTimeout = Duration.ofMinutes(3) | ||
} | ||
|
||
jacocoTestReport { | ||
|
@@ -295,7 +309,7 @@ task stopItestContainer(type: DockerStopContainer) { | |
|
||
task forkedUploadRelease(type: GradleBuild) { | ||
buildFile = project.buildFile | ||
tasks = ["bintrayUpload"] | ||
tasks = ["clean", "publishToSonatype", "closeAndReleaseSonatypeStagingRepository"] | ||
} | ||
|
||
project.tasks.integrationTest.dependsOn(startItestContainer) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |