Skip to content

Commit c5e80fb

Browse files
author
Carlo Castoldi
committed
use Kotlin & QuPath Gradle plugin
see: qupath/qupath-extension-template/pull/21
1 parent 15daae4 commit c5e80fb

File tree

13 files changed

+195
-259
lines changed

13 files changed

+195
-259
lines changed

.github/workflows/build_jar.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
13-
- name: Set up JDK 11
13+
- name: Set up JDK 21
1414
uses: actions/setup-java@v2
1515
with:
16-
java-version: '11'
16+
java-version: '21'
1717
distribution: 'adopt-hotspot'
1818
- name: Grant execute permission for gradlew
1919
run: chmod +x gradlew
2020
- name: Build with Gradle
21-
run: ./gradlew build -P toolchain=11
21+
run: ./gradlew build -P toolchain=21
2222
- uses: actions/upload-artifact@v2
2323
with:
2424
name: jar

.github/workflows/gradle.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
13-
- name: Set up JDK 11
13+
- name: Set up JDK 21
1414
uses: actions/setup-java@v2
1515
with:
16-
java-version: '11'
16+
java-version: '21'
1717
distribution: 'adopt-hotspot'
1818
- name: Grant execute permission for gradlew
1919
run: chmod +x gradlew
2020
- name: Build with Gradle
21-
run: ./gradlew build -P toolchain=11
21+
run: ./gradlew build -P toolchain=21

.github/workflows/publish-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-java@v2
1616
with:
17-
java-version: '11'
17+
java-version: '21'
1818
distribution: 'adopt-hotspot'
1919
- name: Grant execute permission for gradlew
2020
run: chmod +x gradlew
2121
- name: Publish package
22-
run: ./gradlew publish -P toolchain=11 -P release=true
22+
run: ./gradlew publish -P toolchain=21 -P release=true
2323
env:
2424
MAVEN_USER: ${{ secrets.MAVEN_USER }}
2525
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}

.github/workflows/publish-snapshot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-java@v2
1616
with:
17-
java-version: '11'
17+
java-version: '21'
1818
distribution: 'adopt-hotspot'
1919
- name: Grant execute permission for gradlew
2020
run: chmod +x gradlew
2121
- name: Publish package
22-
run: ./gradlew publish -P toolchain=11
22+
run: ./gradlew publish -P toolchain=21
2323
env:
2424
MAVEN_USER: ${{ secrets.MAVEN_USER }}
2525
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}

build.gradle

Lines changed: 0 additions & 107 deletions
This file was deleted.

build.gradle.kts

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
plugins {
2+
// QuPath Gradle extension convention plugin
3+
id("qupath-conventions")
4+
// To optionally create a shadow/fat jar that bundle up any non-core dependencies
5+
id("com.gradleup.shadow") version "8.3.5"
6+
`maven-publish`
7+
}
8+
9+
qupathExtension {
10+
name = "qupath-extension-abba"
11+
group = "ch.epfl.biop"
12+
version = "0.4.0-SNAPSHOT"
13+
description = "QuPath extension to use Aligning Big Brain and Atlases"
14+
automaticModule = "qupath.ext.biop.abba"
15+
}
16+
17+
dependencies {
18+
19+
// Main dependencies for most QuPath extensions
20+
shadow(libs.bundles.qupath)
21+
shadow(libs.bundles.logging)
22+
shadow(libs.qupath.fxtras)
23+
24+
implementation("commons-io:commons-io:2.11.0")
25+
implementation("net.imglib2:imglib2-realtransform:4.0.3")
26+
implementation("qupath.ext.warpy:qupath-extension-warpy:0.3.1")
27+
}
28+
29+
30+
31+
publishing {
32+
repositories {
33+
maven {
34+
name = "scijava"
35+
//credentials(PasswordCredentials::class)
36+
url = if (version.toString().endsWith("SNAPSHOT")) {
37+
uri("https://maven.scijava.org/content/repositories/snapshots")
38+
} else {
39+
uri("https://maven.scijava.org/content/repositories/releases")
40+
}
41+
credentials {
42+
username = System.getenv("MAVEN_USER")
43+
password = System.getenv("MAVEN_PASS")
44+
}
45+
}
46+
}
47+
48+
publications {
49+
create<MavenPublication>("mavenJava") {
50+
pom {
51+
licenses {
52+
license {
53+
name = "GNU General Public License, Version 3"
54+
url = "https://www.gnu.org/licenses/gpl-3.0.txt"
55+
}
56+
}
57+
}
58+
}
59+
}
60+
}

gradle/wrapper/gradle-wrapper.jar

-15.3 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

100644100755
Lines changed: 12 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)