diff options
author | 2021-09-29 02:45:57 +0200 | |
---|---|---|
committer | 2021-09-29 03:16:01 +0200 | |
commit | a155f6ba02e08a75ce6e474a86900b8363f506e8 (patch) | |
tree | b78804c1c0f0968a9625f0656e08f5dadc16924c /gradle | |
parent | Simplify branding (diff) | |
download | refinery-a155f6ba02e08a75ce6e474a86900b8363f506e8.tar.gz refinery-a155f6ba02e08a75ce6e474a86900b8363f506e8.tar.zst refinery-a155f6ba02e08a75ce6e474a86900b8363f506e8.zip |
build: migration to Gradle 7
Diffstat (limited to 'gradle')
-rw-r--r-- | gradle/java-common.gradle | 8 | ||||
-rw-r--r-- | gradle/jmh.gradle | 9 | ||||
-rw-r--r-- | gradle/junit.gradle | 31 | ||||
-rw-r--r-- | gradle/mwe2.gradle | 2 | ||||
-rw-r--r-- | gradle/wrapper/gradle-wrapper.properties | 2 | ||||
-rw-r--r-- | gradle/xtend.gradle | 2 | ||||
-rw-r--r-- | gradle/xtext-common.gradle | 8 |
7 files changed, 31 insertions, 31 deletions
diff --git a/gradle/java-common.gradle b/gradle/java-common.gradle index ee7bfad8..a070c378 100644 --- a/gradle/java-common.gradle +++ b/gradle/java-common.gradle | |||
@@ -5,16 +5,10 @@ repositories { | |||
5 | } | 5 | } |
6 | } | 6 | } |
7 | 7 | ||
8 | apply plugin: 'java' | ||
9 | |||
10 | sourceCompatibility = '11' | 8 | sourceCompatibility = '11' |
11 | targetCompatibility = '11' | 9 | targetCompatibility = '11' |
12 | 10 | ||
13 | configurations.all { | 11 | tasks.named('jar') { |
14 | exclude group: 'asm' | ||
15 | } | ||
16 | |||
17 | jar { | ||
18 | manifest { | 12 | manifest { |
19 | attributes 'Bundle-SymbolicName': project.name | 13 | attributes 'Bundle-SymbolicName': project.name |
20 | } | 14 | } |
diff --git a/gradle/jmh.gradle b/gradle/jmh.gradle index 71fec300..698a57cf 100644 --- a/gradle/jmh.gradle +++ b/gradle/jmh.gradle | |||
@@ -1,6 +1,6 @@ | |||
1 | configurations { | 1 | configurations { |
2 | jmh { | 2 | jmh { |
3 | extendsFrom compile | 3 | extendsFrom implementation |
4 | } | 4 | } |
5 | } | 5 | } |
6 | 6 | ||
@@ -14,17 +14,18 @@ sourceSets { | |||
14 | } | 14 | } |
15 | 15 | ||
16 | dependencies { | 16 | dependencies { |
17 | jmhCompile "org.openjdk.jmh:jmh-core:${jmhVersion}" | 17 | jmhImplementation "org.openjdk.jmh:jmh-core:${jmhVersion}" |
18 | jmhAnnotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:${jmhVersion}" | 18 | jmhAnnotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:${jmhVersion}" |
19 | } | 19 | } |
20 | 20 | ||
21 | task jmh(type: JavaExec, dependsOn: jmhClasses) { | 21 | tasks.register('jmh', JavaExec) { |
22 | dependsOn tasks.named('jmhClasses') | ||
22 | main = 'org.openjdk.jmh.Main' | 23 | main = 'org.openjdk.jmh.Main' |
23 | classpath = sourceSets.jmh.compileClasspath + sourceSets.jmh.runtimeClasspath | 24 | classpath = sourceSets.jmh.compileClasspath + sourceSets.jmh.runtimeClasspath |
24 | } | 25 | } |
25 | 26 | ||
26 | eclipse.classpath { | 27 | eclipse.classpath { |
27 | plusConfigurations += [configurations.jmhCompile, configurations.jmhRuntime] | 28 | plusConfigurations += [configurations.jmhCompileClasspath, configurations.jmhRuntimeClasspath] |
28 | 29 | ||
29 | file.whenMerged { classpath -> | 30 | file.whenMerged { classpath -> |
30 | for (entry in classpath.entries) { | 31 | for (entry in classpath.entries) { |
diff --git a/gradle/junit.gradle b/gradle/junit.gradle index f603a4e4..da0cea8c 100644 --- a/gradle/junit.gradle +++ b/gradle/junit.gradle | |||
@@ -1,27 +1,28 @@ | |||
1 | apply plugin: 'jacoco' | 1 | apply plugin: 'jacoco' |
2 | 2 | ||
3 | dependencies { | 3 | dependencies { |
4 | testCompile "org.junit.jupiter:junit-jupiter-api:${junitVersion}" | 4 | testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}" |
5 | testRuntime "org.junit.jupiter:junit-jupiter-engine:${junitVersion}" | 5 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}" |
6 | testCompile "org.junit.jupiter:junit-jupiter-params:${junitVersion}" | 6 | testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}" |
7 | testCompile "org.hamcrest:hamcrest:${hamcrestVersion}" | 7 | testImplementation "org.hamcrest:hamcrest:${hamcrestVersion}" |
8 | } | 8 | } |
9 | 9 | ||
10 | test { | 10 | def jacocoTestReport = tasks.named('jacocoTestReport') |
11 | jacocoTestReport.configure { | ||
12 | dependsOn test | ||
13 | reports { | ||
14 | xml.required = true | ||
15 | } | ||
16 | } | ||
17 | |||
18 | tasks.named('test') { | ||
11 | useJUnitPlatform { | 19 | useJUnitPlatform { |
12 | excludeTags 'slow' | 20 | excludeTags 'slow' |
13 | } | 21 | } |
22 | finalizedBy jacocoTestReport | ||
14 | } | 23 | } |
15 | 24 | ||
16 | task slowTest(type: Test) { | 25 | tasks.register('slowTest', Test) { |
17 | useJUnitPlatform() | 26 | useJUnitPlatform() |
27 | finalizedBy jacocoTestReport | ||
18 | } | 28 | } |
19 | |||
20 | jacocoTestReport { | ||
21 | dependsOn test | ||
22 | reports { | ||
23 | xml.enabled true | ||
24 | } | ||
25 | } | ||
26 | |||
27 | test.finalizedBy(jacocoTestReport) \ No newline at end of file | ||
diff --git a/gradle/mwe2.gradle b/gradle/mwe2.gradle index 5fd53126..b4ea8bb8 100644 --- a/gradle/mwe2.gradle +++ b/gradle/mwe2.gradle | |||
@@ -1,6 +1,6 @@ | |||
1 | configurations { | 1 | configurations { |
2 | mwe2 { | 2 | mwe2 { |
3 | extendsFrom compile | 3 | extendsFrom implementation |
4 | } | 4 | } |
5 | } | 5 | } |
6 | 6 | ||
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5028f28f..ffed3a25 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties | |||
@@ -1,5 +1,5 @@ | |||
1 | distributionBase=GRADLE_USER_HOME | 1 | distributionBase=GRADLE_USER_HOME |
2 | distributionPath=wrapper/dists | 2 | distributionPath=wrapper/dists |
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip | 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip |
4 | zipStoreBase=GRADLE_USER_HOME | 4 | zipStoreBase=GRADLE_USER_HOME |
5 | zipStorePath=wrapper/dists | 5 | zipStorePath=wrapper/dists |
diff --git a/gradle/xtend.gradle b/gradle/xtend.gradle index b0a62d70..900a95f2 100644 --- a/gradle/xtend.gradle +++ b/gradle/xtend.gradle | |||
@@ -9,7 +9,7 @@ sourceSets { | |||
9 | } | 9 | } |
10 | } | 10 | } |
11 | 11 | ||
12 | clean.doLast { | 12 | tasks.named('clean') { |
13 | delete 'src/main/xtend-gen' | 13 | delete 'src/main/xtend-gen' |
14 | delete 'src/test/xtend-gen' | 14 | delete 'src/test/xtend-gen' |
15 | } | 15 | } |
diff --git a/gradle/xtext-common.gradle b/gradle/xtext-common.gradle index f34108f3..4993ed7e 100644 --- a/gradle/xtext-common.gradle +++ b/gradle/xtext-common.gradle | |||
@@ -1,7 +1,11 @@ | |||
1 | apply from: "${rootDir}/gradle/java-common.gradle" | 1 | apply from: "${rootDir}/gradle/java-common.gradle" |
2 | 2 | ||
3 | dependencies { | 3 | dependencies { |
4 | compile platform("org.eclipse.xtext:xtext-dev-bom:${xtextVersion}") | 4 | implementation platform("org.eclipse.xtext:xtext-dev-bom:${xtextVersion}") |
5 | } | ||
6 | |||
7 | configurations.all { | ||
8 | exclude group: 'asm' | ||
5 | } | 9 | } |
6 | 10 | ||
7 | sourceSets { | 11 | sourceSets { |
@@ -15,7 +19,7 @@ sourceSets { | |||
15 | } | 19 | } |
16 | } | 20 | } |
17 | 21 | ||
18 | clean.doLast { | 22 | tasks.named('clean') { |
19 | delete 'src/main/xtext-gen' | 23 | delete 'src/main/xtext-gen' |
20 | delete 'src/test/xtext-gen' | 24 | delete 'src/test/xtext-gen' |
21 | } | 25 | } |