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

Migrate to gradle.kts (Gradle Kotlin DSL) #234

Merged
merged 9 commits into from
Jul 2, 2023
Merged

Migrate to gradle.kts (Gradle Kotlin DSL) #234

merged 9 commits into from
Jul 2, 2023

Conversation

will-molloy
Copy link
Owner

@will-molloy will-molloy commented Jun 29, 2023

A bit painful!

  • IntelliJ doesn't give syntax highlighting until file is valid
  • Documentation sucks... have to search GitHub to see how other people use plugins etc.
  • Some plugins broken (test-sets), so used workaround

Closes #232

Making new file... otherwise intellij doesn't show syntax highlighting
(it needs a successful compile first...)
Almost there....
TODO:
- test-sets
- spotbugs config
- plugins DSL
But still using 'apply' syntax for 'subprojects'... not sure if this is
the best way for multi-project setup? Any examples to copy??

Btw need `java-library` plugin to get extension methods such as
`implementation`. Groovy doesn't need it because it's dynamic:
unbroken-dome/gradle-testsets-plugin#109 (comment)
@codecov
Copy link

codecov bot commented Jul 1, 2023

Codecov Report

Merging #234 (3768981) into main (3d6fb33) will not change coverage.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##                main      #234   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity         2         2           
===========================================
  Files              1         1           
  Lines              4         4           
===========================================
  Hits               4         4           
Flag Coverage Δ
integration-tests-macos-latest ?
integration-tests-ubuntu-latest 100.00% <100.00%> (ø)
integration-tests-windows-latest 100.00% <100.00%> (ø)
unit-tests-macos-latest 100.00% <100.00%> (ø)
unit-tests-ubuntu-latest 100.00% <100.00%> (ø)
unit-tests-windows-latest 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...world/src/main/java/com/willmolloy/HelloWorld.java 100.00% <100.00%> (ø)

build.gradle.kts Outdated Show resolved Hide resolved
Plugin config not working in `subprojects` block: unbroken-dome/gradle-testsets-plugin#109 (comment)
So applying it in the subproject `build.gradle.kts`... means duplicate
code if there's more than 1 subproject...

There are other ways to register `integrationTest` task: https://stackoverflow.com/questions/52904603/integration-tests-with-gradle-kotlin-dsl
But it's a lot more code, and none of them add `jacoco` for free.
build.gradle.kts Outdated Show resolved Hide resolved
@will-molloy will-molloy changed the title kotlin dsl Migrate to gradle.kts (Gradle Kotlin DSL) Jul 1, 2023
@will-molloy will-molloy marked this pull request as ready for review July 1, 2023 23:51
@will-molloy will-molloy merged commit 84d30ec into main Jul 2, 2023
8 checks passed
@will-molloy will-molloy deleted the kotlin-dsl branch July 2, 2023 02:01
will-molloy added a commit to will-molloy/auto-handbrake-encoding that referenced this pull request Jul 2, 2023
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.

Gradle Kotlin DSL
1 participant