Skip to content

Commit

Permalink
Merge pull request #11 from petebankhead/build
Browse files Browse the repository at this point in the history
Use gradle plugin
  • Loading branch information
petebankhead authored Dec 10, 2024
2 parents 0162587 + db6f41e commit 4f07371
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 132 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/build_jar.yml

This file was deleted.

62 changes: 41 additions & 21 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,41 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt-hotspot'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build -P toolchain=11
name: Run gradle build

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
workflow_dispatch:
workflow_call:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build with Gradle
run: |
./gradlew build
- uses: actions/upload-artifact@v4
with:
path: build/libs/*.jar
name: build
retention-days: 7
56 changes: 0 additions & 56 deletions build.gradle

This file was deleted.

21 changes: 21 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins {
id("qupath-conventions")
}

qupathExtension {
name = "qupath-extension-align"
version = "0.5.0-SNAPSHOT"
group = "io.github.qupath"
description = "QuPath extension for interactive image alignment"
automaticModule = "qupath.extension.align"
}

dependencies {

implementation(libs.bundles.qupath)
implementation(libs.bundles.logging)

// For testing
testImplementation(libs.junit)

}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
28 changes: 0 additions & 28 deletions settings.gradle

This file was deleted.

17 changes: 17 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven {
url = uri("https://maven.scijava.org/content/repositories/releases")
}
}
}

qupath {
version = "0.5.0"
}

// Apply QuPath Gradle settings plugin to handle configuration
plugins {
id("io.github.qupath.qupath-extension-settings") version "0.2.1"
}

0 comments on commit 4f07371

Please sign in to comment.