From 3e071f878ad4ccfa2d57325e30a18b9fc2dfd442 Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sat, 21 Dec 2024 20:53:17 +0200 Subject: [PATCH] Clean Gradle --- .github/workflows/dist.yml | 2 +- build.gradle | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 67aac66..fe2b034 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -19,7 +19,7 @@ jobs: java-version: 17 cache: gradle - name: Build with Gradle - run: ./gradlew dist + run: ./gradlew test dist - name: Set variables run: | echo "CHKSUM=$(shasum -a 256 build/distributions/com.elovirta.pdf-*.zip | cut -d ' ' -f 1)" >> $GITHUB_ENV diff --git a/build.gradle b/build.gradle index 897c4ff..b2e1f4d 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ sourceCompatibility = 17 targetCompatibility = 17 dependencies { - implementation group: 'org.apache.ant', name: 'ant', version:'1.10.12' + implementation group: 'org.apache.ant', name: 'ant', version: '1.10.12' implementation(group: 'com.google.guava', name: 'guava', version: '25.1-jre') { exclude group: 'org.checkerframework', module: 'checker-qual' exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations' @@ -44,18 +44,19 @@ sourceSets { } } -task dist(type: Zip, dependsOn: [jar]) { +tasks.register('dist', Zip) { + dependsOn tasks.jar into("lib") { - from ("build/libs") { + from("build/libs") { include "*.jar" } } into("") { - from ("src/main/resources") { + from("src/main/resources") { include "build.xml" include "schema.json" } - from ("src/main/resources") { + from("src/main/resources") { expand( id: project.name, version: project.version