Skip to content

Commit b0949aa

Browse files
committed
fix: Kotlin plugin warning
Build scripts use the `buildscript` way to configure the project's plugins, which is not recommended anymore since quite a few versions in gradle. ``` The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build. This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal. Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects. If the parent project does not need the plugin, add 'apply false' to the plugin line. See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl The Kotlin plugin was loaded in the following projects: ':dd-java-agent:agent-ci-visibility', ':dd-java-agent:agent-llmobs' ```
1 parent 1772b5b commit b0949aa

File tree

3 files changed

+57
-57
lines changed

3 files changed

+57
-57
lines changed

dd-java-agent/agent-ci-visibility/build.gradle

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
22

3-
buildscript {
4-
repositories {
5-
mavenLocal()
6-
if (project.rootProject.hasProperty("gradlePluginProxy")) {
7-
maven {
8-
url project.rootProject.property("gradlePluginProxy")
9-
allowInsecureProtocol = true
10-
}
11-
}
12-
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
13-
maven {
14-
url project.rootProject.property("mavenRepositoryProxy")
15-
allowInsecureProtocol = true
16-
}
17-
}
18-
gradlePluginPortal()
19-
mavenCentral()
20-
}
21-
22-
dependencies {
23-
classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: libs.versions.kotlin.get()
24-
}
25-
}
3+
// buildscript {
4+
// repositories {
5+
// mavenLocal()
6+
// if (project.rootProject.hasProperty("gradlePluginProxy")) {
7+
// maven {
8+
// url project.rootProject.property("gradlePluginProxy")
9+
// allowInsecureProtocol = true
10+
// }
11+
// }
12+
// if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
13+
// maven {
14+
// url project.rootProject.property("mavenRepositoryProxy")
15+
// allowInsecureProtocol = true
16+
// }
17+
// }
18+
// gradlePluginPortal()
19+
// mavenCentral()
20+
// }
21+
//
22+
// dependencies {
23+
// classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: libs.versions.kotlin.get()
24+
// }
25+
// }
2626

2727
plugins {
2828
id 'com.gradleup.shadow'

dd-java-agent/agent-llmobs/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
22

3-
buildscript {
4-
repositories {
5-
mavenCentral()
6-
}
7-
8-
dependencies {
9-
classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: libs.versions.kotlin.get()
10-
}
11-
}
3+
// buildscript {
4+
// repositories {
5+
// mavenCentral()
6+
// }
7+
//
8+
// dependencies {
9+
// classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: libs.versions.kotlin.get()
10+
// }
11+
// }
1212

1313
plugins {
1414
id 'com.gradleup.shadow'

dd-java-agent/instrumentation/build.gradle

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
22

3-
// this project will run in isolation under the agent's classloader
4-
buildscript {
5-
6-
repositories {
7-
mavenLocal()
8-
if (project.rootProject.hasProperty("gradlePluginProxy")) {
9-
maven {
10-
url project.rootProject.property("gradlePluginProxy")
11-
allowInsecureProtocol = true
12-
}
13-
}
14-
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
15-
maven {
16-
url project.rootProject.property("mavenRepositoryProxy")
17-
allowInsecureProtocol = true
18-
}
19-
}
20-
gradlePluginPortal()
21-
mavenCentral()
22-
}
23-
24-
dependencies {
25-
classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: libs.versions.kotlin.get()
26-
}
27-
}
3+
// // this project will run in isolation under the agent's classloader
4+
// buildscript {
5+
//
6+
// repositories {
7+
// mavenLocal()
8+
// if (project.rootProject.hasProperty("gradlePluginProxy")) {
9+
// maven {
10+
// url project.rootProject.property("gradlePluginProxy")
11+
// allowInsecureProtocol = true
12+
// }
13+
// }
14+
// if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
15+
// maven {
16+
// url project.rootProject.property("mavenRepositoryProxy")
17+
// allowInsecureProtocol = true
18+
// }
19+
// }
20+
// gradlePluginPortal()
21+
// mavenCentral()
22+
// }
23+
//
24+
// dependencies {
25+
// classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: libs.versions.kotlin.get()
26+
// }
27+
// }
2828
plugins {
2929
id 'com.gradleup.shadow'
3030
}

0 commit comments

Comments
 (0)