Skip to content

Commit c02cf1a

Browse files
committed
fix: remove gradleApi and gradleTestKit dependencies from all configurations, fixed #144
1 parent 18eca6a commit c02cf1a

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ allprojects {
2020
}
2121
}
2222
}
23+
24+
configurations.all {
25+
if (name == "compileOnly") {
26+
return@all
27+
}
28+
29+
dependencies.remove(project.dependencies.gradleApi())
30+
dependencies.remove(project.dependencies.gradleTestKit())
31+
}
2332

2433
// if (subprojects.isEmpty()) {
2534
// apply(plugin = rootProject.libs.plugins.dokka.get().pluginId)

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
77
javaVersion=21
88
mcVersion=1.21.10
99
group=dev.slne.surf
10-
version=1.21.10-2.40.0
10+
version=1.21.10-2.40.1
1111
relocationPrefix=dev.slne.surf.surfapi.libs
1212
snapshot=false

surf-api-gradle-plugin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ plugins {
2020
group = groupId
2121
version = buildString {
2222
append(mcVersion)
23-
append("-1.5.2")
23+
append("-1.5.3")
2424
if (snapshot) append("-SNAPSHOT")
2525
}
2626

surf-api-gradle-plugin/src/main/kotlin/dev/slne/surf/surfapi/gradle/platform/common/CommonSurfPlugin.kt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ import org.gradle.api.model.ObjectFactory
1212
import org.gradle.api.plugins.JavaPluginExtension
1313
import org.gradle.api.publish.PublishingExtension
1414
import org.gradle.api.tasks.compile.JavaCompile
15-
import org.gradle.kotlin.dsl.configure
16-
import org.gradle.kotlin.dsl.dependencies
17-
import org.gradle.kotlin.dsl.maven
18-
import org.gradle.kotlin.dsl.repositories
19-
import org.gradle.kotlin.dsl.withType
15+
import org.gradle.kotlin.dsl.*
2016
import org.jetbrains.kotlin.allopen.gradle.AllOpenExtension
2117
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
2218
import org.jetbrains.kotlin.gradle.utils.COMPILE_ONLY
@@ -154,6 +150,15 @@ abstract class CommonSurfPlugin<E : CommonSurfExtension>(
154150
options.compilerArgs.addAll(listOf("-parameters"))
155151
}
156152

153+
configurations.all {
154+
if (name == "compileOnly") {
155+
return@all
156+
}
157+
158+
dependencies.remove(project.dependencies.gradleApi())
159+
dependencies.remove(project.dependencies.gradleTestKit())
160+
}
161+
157162
configureAutoService()
158163
configureKotlin()
159164
configureAllOpen()

0 commit comments

Comments
 (0)