Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Kotlin & QuPath Gradle Plugin #21

Merged
merged 7 commits into from
Jan 10, 2025
Merged

Conversation

petebankhead
Copy link
Member

Updates this repo for QuPath v0.6.0 with two big changes:

The practical outcome is that the build files can be much shorter and simpler.

Copy link
Contributor

@alanocallaghan alanocallaghan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, hopefully kotlin isn't intimidating for new users (or at least if so, they don't ever have to deal with it)

@petebankhead
Copy link
Member Author

Thanks, this will take a bit longer since it's failing with includeFlat... unless I use includeBuild with the plugin repo... errors are obscure and I am very lost.

@petebankhead
Copy link
Member Author

petebankhead commented Nov 29, 2024

With regard to intimidatingness, I think it should be much lower now as there are only two blocks that need to be edited - and perhaps the dependencies block, but that's standard Gradle, and Gradle's own docs now show Kotlin instructions more prominently than Groovy.

build.gradle.kts

// TODO: Configure your extension here (please change the defaults!)
 qupathExtension {
     name = "qupath-extension-template"
     group = "io.github.qupath"
     version = "0.1.0-SNAPSHOT"
     description = "A simple QuPath extension"
     automaticModule = "io.github.qupath.extension.template"
 }

settings.gradle.kts

// TODO: Specify which version of QuPath the extension is targeting here
 qupath {
     version = "0.6.0-SNAPSHOT"
 }

@petebankhead
Copy link
Member Author

See qupath/qupath#1709 for more info.

@alanocallaghan
Copy link
Contributor

With regard to intimidatingness, I think it should be much lower now as there are only two blocks that need to be edited - and perhaps the dependencies block, but that's standard Gradle, and Gradle's own docs now show Kotlin instructions more prominently than Groovy.

Rationally I agree, but I feel like sometimes people are unduly put off by different languages. I don't think it's worth stopping useful improvements for though either way

carlocastoldi pushed a commit to carlocastoldi/qupath-extension-braian that referenced this pull request Dec 6, 2024
carlocastoldi pushed a commit to carlocastoldi/qupath-extension-abba that referenced this pull request Dec 6, 2024
carlocastoldi pushed a commit to carlocastoldi/qupath-extension-braian that referenced this pull request Dec 6, 2024
carlocastoldi pushed a commit to carlocastoldi/qupath-extension-abba that referenced this pull request Dec 6, 2024
carlocastoldi pushed a commit to carlocastoldi/qupath-extension-abba that referenced this pull request Dec 10, 2024
carlocastoldi pushed a commit to carlocastoldi/qupath-extension-abba that referenced this pull request Jan 10, 2025
@carlocastoldi
Copy link

with this PR, running ./gradlew clean shadowJar -P toolchain=21 fails because it cannot choose between the available variants dependencies for libs.qupath.fxtras :\

Needed to resolve issue reported by @carlocastoldi
Since it's the current stable release.
@petebankhead petebankhead merged commit 6b1d4dd into qupath:main Jan 10, 2025
1 check passed
@petebankhead petebankhead deleted the kotlin branch January 10, 2025 17:49
@petebankhead
Copy link
Member Author

Thanks @carlocastoldi that should now be fixed (the order the plugins are added at the top of build.gradle.kts is what matters)

carlocastoldi pushed a commit to carlocastoldi/qupath-extension-braian that referenced this pull request Jan 14, 2025
carlocastoldi pushed a commit to carlocastoldi/qupath-extension-braian that referenced this pull request Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants