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

Optimize gradle #1482

Merged
merged 3 commits into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: gradle
directory: "/"
schedule:
interval: daily
20 changes: 9 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ ext.moduleName = 'info.picocli'

buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
gradlePluginPortal()
mavenCentral()
}

Expand Down Expand Up @@ -62,10 +60,10 @@ allprojects {
apply plugin: 'java'
apply plugin: 'java-library' // to avoid https://github.com/gradle/gradle/issues/1118

sourceCompatibility = !org.gradle.api.JavaVersion.current().isJava9Compatible() ?
1.5 : org.gradle.api.JavaVersion.current().isJava11Compatible() ? 1.7 : 1.6
targetCompatibility = !org.gradle.api.JavaVersion.current().isJava9Compatible() ?
1.5 : org.gradle.api.JavaVersion.current().isJava11Compatible() ? 1.7 : 1.6
sourceCompatibility = !JavaVersion.current().isJava9Compatible() ?
1.5 : JavaVersion.current().isJava11Compatible() ? 1.7 : 1.6
targetCompatibility = !JavaVersion.current().isJava9Compatible() ?
1.5 : JavaVersion.current().isJava11Compatible() ? 1.7 : 1.6

compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
Expand Down Expand Up @@ -109,7 +107,7 @@ sourceSets.main.java.srcDirs = ['src/main/java', 'src/main/java9']
compileJava {
inputs.property("moduleName", moduleName)
doFirst {
if (org.gradle.api.JavaVersion.current().isJava9Compatible()) {
if (JavaVersion.current().isJava9Compatible()) {
options.compilerArgs = [
'--module-path', classpath.asPath,
]
Expand All @@ -133,10 +131,10 @@ jar {
}

// jacoco 0.8.2 does not work with Java 13; gradle 4.x has no JavaVersion enum value for Java 12
if (org.gradle.api.JavaVersion.current().isJava11Compatible()) {
project.logger.lifecycle("skipping jacoco test for Java version ${org.gradle.api.JavaVersion.current()}")
if (JavaVersion.current().isJava11Compatible()) {
project.logger.lifecycle("skipping jacoco test for Java version ${JavaVersion.current()}")
} else {
project.logger.lifecycle("applying jacoco build file for Java version ${org.gradle.api.JavaVersion.current()}")
project.logger.lifecycle("applying jacoco build file for Java version ${JavaVersion.current()}")
apply from: "gradle/jacoco.gradle"
}

Expand Down
10 changes: 0 additions & 10 deletions dependabot.yml

This file was deleted.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
1 change: 0 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading