mirror of
https://github.com/jlengrand/jreleaser.git
synced 2026-03-10 08:31:24 +00:00
[chore] Configure cross-platform jlink distribution
This commit is contained in:
10
.github/workflows/early-access.yml
vendored
10
.github/workflows/early-access.yml
vendored
@@ -41,10 +41,20 @@ jobs:
|
||||
id: vars
|
||||
run: echo ::set-output name=version::$(cat VERSION)
|
||||
|
||||
- name: Assemble
|
||||
uses: jreleaser/release-action@v1
|
||||
with:
|
||||
version: early-access
|
||||
arguments: assemble
|
||||
env:
|
||||
JRELEASER_PROJECT_VERSION: ${{ steps.vars.outputs.version }}
|
||||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
|
||||
|
||||
- name: Release
|
||||
uses: jreleaser/release-action@v1
|
||||
with:
|
||||
version: early-access
|
||||
arguments: full-release
|
||||
env:
|
||||
JRELEASER_PROJECT_VERSION: ${{ steps.vars.outputs.version }}
|
||||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
|
||||
|
||||
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@@ -61,10 +61,20 @@ jobs:
|
||||
-PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }} \
|
||||
build publishToSonatype publishPlugins -S
|
||||
|
||||
- name: Assmble
|
||||
uses: jreleaser/release-action@v1
|
||||
with:
|
||||
version: early-access
|
||||
arguments: assemble
|
||||
env:
|
||||
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }}
|
||||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
|
||||
|
||||
- name: Release
|
||||
uses: jreleaser/release-action@v1
|
||||
with:
|
||||
version: early-access
|
||||
arguments: full-release
|
||||
env:
|
||||
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }}
|
||||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
plugins {
|
||||
id 'application'
|
||||
id 'de.undercouch.download'
|
||||
}
|
||||
|
||||
application {
|
||||
@@ -47,6 +48,7 @@ dependencies {
|
||||
api "org.slf4j:slf4j-api:$slf4jVersion"
|
||||
runtimeOnly "org.slf4j:slf4j-simple:$slf4jVersion"
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property('version', project.version)
|
||||
filesMatching(['**/*.properties']) {
|
||||
@@ -70,4 +72,94 @@ distributions {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ext.jdks = [
|
||||
[
|
||||
platform: 'linux',
|
||||
file: 'zulu11.48.21-ca-jdk11.0.11-linux_x64.zip',
|
||||
url: 'https://cdn.azul.com/zulu/bin/zulu11.48.21-ca-jdk11.0.11-linux_x64.zip',
|
||||
checksum: '9d1718ef74c29a8148b67ddd90bc9267fc1614e0a1eb0f4ea16e234e86419a60',
|
||||
tasks: [:]
|
||||
],
|
||||
[
|
||||
platform: 'windows',
|
||||
file: 'zulu11.48.21-ca-jdk11.0.11-win_x64.zip',
|
||||
url: 'https://cdn.azul.com/zulu/bin/zulu11.48.21-ca-jdk11.0.11-win_x64.zip',
|
||||
checksum: '7bcbaedecca73811f70a5ee89e9258afff9bc009286449d97d9b3105f52a1a3a',
|
||||
tasks: [:]
|
||||
],
|
||||
[
|
||||
platform: 'osx',
|
||||
file: 'zulu11.48.21-ca-jdk11.0.11-macosx_x64.zip',
|
||||
url: 'https://cdn.azul.com/zulu/bin/zulu11.48.21-ca-jdk11.0.11-macosx_x64.zip',
|
||||
checksum: 'abc3a9696fb6c10efcf3c5878cdb049244b0ba5dcc7141c6f0f88b99df626d2a',
|
||||
tasks: [:]
|
||||
]
|
||||
]
|
||||
|
||||
for (jdk in jdks) {
|
||||
def downloadJdk = tasks.create("download${jdk.platform.capitalize()}Jdk".toString(), de.undercouch.gradle.tasks.download.Download) {
|
||||
group = 'Jdks'
|
||||
description = "Download ${jdk.platform.capitalize()} JDK"
|
||||
|
||||
src jdk.url
|
||||
dest project.file("${buildDir}/jdks/${jdk.file}".toString())
|
||||
doFirst {
|
||||
project.file("${buildDir}/jdks/").mkdirs()
|
||||
}
|
||||
}
|
||||
jdk.tasks.download = downloadJdk
|
||||
|
||||
def verifyJdk = tasks.create("verify${jdk.platform.capitalize()}Jdk".toString(), de.undercouch.gradle.tasks.download.Verify) {
|
||||
group = 'Jdks'
|
||||
description = "Verify ${jdk.platform.capitalize()} JDK"
|
||||
dependsOn downloadJdk
|
||||
|
||||
src downloadJdk.dest
|
||||
algorithm 'SHA-256'
|
||||
checksum jdk.checksum
|
||||
}
|
||||
jdk.tasks.verify = verifyJdk
|
||||
|
||||
def unzipJdk = tasks.create("unzip${jdk.platform.capitalize()}Jdk".toString(), Copy) {
|
||||
group = 'Jdks'
|
||||
description = "Unzip ${jdk.platform.capitalize()} JDK"
|
||||
dependsOn verifyJdk
|
||||
|
||||
from zipTree(downloadJdk.dest)
|
||||
into project.file("${buildDir}/jdks".toString())
|
||||
}
|
||||
jdk.tasks.unzip = unzipJdk
|
||||
}
|
||||
|
||||
def downloadJdks = tasks.create('downloadJdks', DefaultTask) {
|
||||
group = 'Jdks'
|
||||
description = 'Download all JDKs'
|
||||
dependsOn jdks.tasks.download
|
||||
}
|
||||
|
||||
def verifyJdks = tasks.create('verifyJdks', DefaultTask) {
|
||||
group = 'Jdks'
|
||||
description = 'Verify all JDKs'
|
||||
dependsOn jdks.tasks.verify
|
||||
}
|
||||
|
||||
def unzipJdks = tasks.create('unzipJdks', DefaultTask) {
|
||||
group = 'Jdks'
|
||||
description = 'Unzip all JDKs'
|
||||
dependsOn jdks.tasks.unzip
|
||||
}
|
||||
|
||||
def jdksTask = tasks.create('jdks') {
|
||||
group = 'Jdks'
|
||||
description = 'Download, verify, unzips all JDKS'
|
||||
dependsOn downloadJdks, verifyJdks, unzipJdks
|
||||
}
|
||||
|
||||
copyDependencies {
|
||||
configuration = 'runtimeClasspath'
|
||||
}
|
||||
|
||||
assembleDist.dependsOn copyDependencies
|
||||
assemble.dependsOn jdksTask
|
||||
@@ -1,7 +1,16 @@
|
||||
project:
|
||||
name: jreleaser
|
||||
description: Release Java projects quickly and easily with JReleaser
|
||||
longDescription: Release Java projects quickly and easily with JReleaser
|
||||
longDescription: |
|
||||
JReleaser is a release automation tool for Java projects. Its goal is to simplify creating releases
|
||||
and publishing artifacts to multiple package managers while providing customizable options.
|
||||
|
||||
JReleaser takes inputs from popular builds tools (Ant, Maven, Gradle) such as JAR files, binary
|
||||
distributions (.zip, .tar), JLink images, or any other file that you’d like to publish as a Git
|
||||
release on popular Git services such as Github or Gitlab. Distribution files can additionally be
|
||||
published to be consumed by popular package managers as Homebrew, Snapcraft, or get ready to be
|
||||
launched via Jbang. Releases may be announced in a variety of channels such as Twitter, Zulip, or SDKMAN!
|
||||
|
||||
website: https://jreleaser.org
|
||||
authors:
|
||||
- Andres Almiray
|
||||
@@ -26,6 +35,38 @@ announce:
|
||||
sdkman:
|
||||
active: release
|
||||
|
||||
assemble:
|
||||
jlinks:
|
||||
jreleaser-standalone:
|
||||
active: always
|
||||
extraProperties:
|
||||
sdkmanSkip: true
|
||||
java:
|
||||
version: 11
|
||||
mainClass: org.jreleaser.cli.Main
|
||||
imageName: 'jreleaser-standalone-{{projectEffectiveVersion}}'
|
||||
executable: 'jreleaser'
|
||||
moduleNames:
|
||||
- java.base
|
||||
- java.desktop
|
||||
- java.management
|
||||
- java.naming
|
||||
- java.rmi
|
||||
- java.security.jgss
|
||||
- java.sql
|
||||
targetJdks:
|
||||
- path: 'apps/jreleaser/build/jdks/zulu11.48.21-ca-jdk11.0.11-macosx_x64/zulu-11.jdk/Contents/Home'
|
||||
platform: osx
|
||||
- path: 'apps/jreleaser/build/jdks/zulu11.48.21-ca-jdk11.0.11-linux_x64'
|
||||
platform: linux
|
||||
- path: 'apps/jreleaser/build/jdks/zulu11.48.21-ca-jdk11.0.11-win_x64'
|
||||
platform: windows
|
||||
mainJar:
|
||||
path: 'apps/jreleaser/build/libs/jreleaser-{{projectVersion}}.jar'
|
||||
jars:
|
||||
- directory: 'apps/jreleaser/build/dependencies/flat'
|
||||
include: '*.jar'
|
||||
|
||||
distributions:
|
||||
jreleaser:
|
||||
java:
|
||||
@@ -37,6 +78,10 @@ distributions:
|
||||
snap:
|
||||
active: release
|
||||
remoteBuild: true
|
||||
base: core18
|
||||
localPlugs:
|
||||
- network
|
||||
- home
|
||||
jbang:
|
||||
active: always
|
||||
artifacts:
|
||||
|
||||
@@ -27,6 +27,7 @@ buildscript {
|
||||
classpath "org.kordamp.gradle:groovy-project-gradle-plugin:$kordampPluginVersion"
|
||||
classpath "org.kordamp.gradle:plugin-gradle-plugin:$kordampPluginVersion"
|
||||
classpath "org.kordamp.gradle:kordamp-parentbuild:$kordampBuildVersion"
|
||||
classpath 'de.undercouch:gradle-download-task:4.1.1'
|
||||
classpath "org.ow2.asm:asm:$asmVersion"
|
||||
classpath "org.ow2.asm:asm-commons:$asmVersion"
|
||||
classpath "org.ow2.asm:asm-analysis:$asmVersion"
|
||||
|
||||
Reference in New Issue
Block a user