Skip to content

Commit

Permalink
Add gradle task type parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jwharm committed Feb 28, 2024
1 parent 785c47e commit d3066f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions buildSrc/src/main/groovy/java-gi.library-conventions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ generateSources.configure {
// Add the generated sources to the main sourceSet
sourceSets.main.java.srcDir(generateSources)

tasks.named('compileJava') {
tasks.named('compileJava', JavaCompile) {
options.compilerArgs += '--enable-preview'
options.encoding = 'UTF-8'
}

tasks.named('javadoc') {
tasks.named('javadoc', Javadoc) {
if (System.getenv('CI')) {
enabled = false
}
Expand All @@ -73,12 +73,12 @@ tasks.named('javadoc') {
options.encoding = 'UTF-8'
}

tasks.named('compileTestJava') {
tasks.named('compileTestJava', JavaCompile) {
options.compilerArgs += '--enable-preview'
options.encoding = 'UTF-8'
}

tasks.named('test') {
tasks.named('test', Test) {
// Don't run tests in Github action. The native libraries aren't installed.
if (System.getenv('CI')) {
enabled = false
Expand Down

0 comments on commit d3066f5

Please sign in to comment.