Skip to content

Commit c7cc034

Browse files
authored
Build issue/remove specific JVM vendor (#142)
1 parent 4c6544e commit c7cc034

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

buildSrc/src/main/kotlin/common-kotlin.gradle.kts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,18 @@ plugins {
2323

2424
kotlin {
2525
jvmToolchain {
26-
this.languageVersion.set(JavaLanguageVersion.of(properties("javaVersion", project)))
27-
this.vendor.set(JvmVendorSpec.AMAZON)
26+
this.languageVersion.set(JavaLanguageVersion.of(properties("javaVersion", project)))
2827
}
2928
}
3029

3130

32-
dependencies{
31+
dependencies {
3332
//add the kotlin test library to all projects that apply this common-kotlin plugin.
3433
//so all project are ready to use kotlin test
3534
testImplementation(kotlin("test"))
3635
}
3736

38-
tasks{
37+
tasks {
3938
properties("javaVersion", project).let {
4039
withType<KotlinCompile> {
4140
kotlinOptions.jvmTarget = it

buildSrc/src/main/kotlin/digma-base.gradle.kts

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ import common.properties
22
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
33
import org.gradle.api.tasks.testing.logging.TestLogEvent
44

5-
plugins{
5+
plugins {
66
`java`
77
`jvm-test-suite`
88
id("com.dorongold.task-tree")
99
id("com.glovoapp.semantic-versioning")
1010
}
1111

12-
semanticVersion{
12+
semanticVersion {
1313
//if the propertiesFile is not changed the plugin will look for a file in each module.
1414
propertiesFile.set(project.rootProject.file("version.properties"))
1515
}
16-
tasks.incrementSemanticVersion{
16+
17+
tasks.incrementSemanticVersion {
1718
//disable the task for all projects.
1819
//because digma-base is applied to all projects then calling incrementSemanticVersion will be invoked
1920
//for each project and we don't want that.
@@ -24,12 +25,11 @@ tasks.incrementSemanticVersion{
2425

2526
java {
2627
toolchain {
27-
languageVersion.set(JavaLanguageVersion.of(properties("javaVersion",project)))
28-
vendor.set(JvmVendorSpec.AMAZON)
28+
languageVersion.set(JavaLanguageVersion.of(properties("javaVersion", project)))
2929
}
3030
}
3131

32-
group = properties("pluginGroup",project)
32+
group = properties("pluginGroup", project)
3333
version = project.semanticVersion.version.get()
3434

3535
repositories {
@@ -46,12 +46,12 @@ configurations {
4646
}
4747

4848

49-
project.afterEvaluate{
50-
tasks{
49+
project.afterEvaluate {
50+
tasks {
5151
//the project can be built with build task or buildPlugin task. build triggers buildPlugin.
5252
//but buildPlugin doesn't trigger build, so if calling only buildPlugin unit tests will not run.
5353
//if the project is built by calling buildPlugin we want it to trigger test.
54-
named("buildPlugin"){
54+
named("buildPlugin") {
5555
dependsOn(test)
5656
}
5757
}
@@ -93,9 +93,7 @@ testing {
9393

9494

9595

96-
97-
98-
tasks{
96+
tasks {
9997

10098
withType<JavaCompile> {
10199
options.compilerArgs.addAll(listOf("-Xlint:unchecked,deprecation"))
@@ -131,7 +129,6 @@ tasks{
131129
}
132130
})
133131

134-
135132
testLogging {
136133
lifecycle {
137134
events = mutableSetOf(TestLogEvent.FAILED)
@@ -162,6 +159,4 @@ tasks{
162159
}
163160
}
164161

165-
166-
167162
}

0 commit comments

Comments
 (0)