Skip to content

Commit 0f9d5e2

Browse files
committed
chore: more cleanups and new plugin version
1 parent 393e1bf commit 0f9d5e2

File tree

2 files changed

+2
-48
lines changed

2 files changed

+2
-48
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ org-name = "suresh.dev"
2020
org-url = "https://suresh.dev"
2121

2222
# Dependency Versions
23-
bc-plugins = "2.22.0"
23+
bc-plugins = "2.23.0"
2424
kotlinx-kover = "0.9.3"
2525
kotlin-dokka = "2.1.0"
2626
kotlinx-io = "0.8.2"

plugins/project/src/main/kotlin/dev.suresh.plugin.graalvm.gradle.kts

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import common.*
44
import common.Platform
55
import me.saket.bytesize.*
6-
import org.jetbrains.kotlin.gradle.utils.extendsFrom
76

87
plugins {
98
application
@@ -119,44 +118,6 @@ graalvmNative {
119118
toolchainDetection = true
120119
}
121120

122-
/**
123-
* Creates a custom sourceset(`graal`) for GraalVM native image build time configurations. The
124-
* following configurations will
125-
* - Creates a `graal` source set.
126-
* - Add `main` output to `graal` compile and runtime classpath.
127-
* - Add `main` dependencies to `graal` compile and runtime classpath.
128-
* - Add `graal` dependencies (graalImplementation) to native-image classpath.
129-
* - Add `graal` output to native-image classpath.
130-
*
131-
* For each source set added to the project, the Java plugins add a few
132-
* [dependency configurations](https://docs.gradle.org/current/userguide/java_plugin.html#java_source_set_configurations)
133-
* - graalImplementation
134-
* - graalCompileOnly
135-
* - graalRuntimeOnly
136-
* - graalCompileClasspath (CompileOnly + Implementation)
137-
* - graalRuntimeClasspath (RuntimeOnly + Implementation)
138-
*
139-
* [Configure-Custom-SourceSet](https://docs.gradle.org/current/userguide/java_testing.html#sec:configuring_java_integration_tests)
140-
*/
141-
val graal by
142-
sourceSets.registering {
143-
compileClasspath += sourceSets.main.get().output
144-
runtimeClasspath += sourceSets.main.get().output
145-
}
146-
147-
configurations {
148-
val graalImplementation by existing
149-
val graalRuntimeOnly by existing
150-
151-
// graalImplementation extendsFrom main source set implementation
152-
graalImplementation.extendsFrom(implementation)
153-
graalRuntimeOnly.extendsFrom(runtimeOnly)
154-
155-
// Finally, nativeImage classpath extendsFrom graalImplementation
156-
// This way all main + graal dependencies are also available at native image build time.
157-
nativeImageClasspath.extendsFrom(graalImplementation)
158-
}
159-
160121
tasks {
161122
val archiveTgz by
162123
registering(Tar::class) {
@@ -182,7 +143,6 @@ tasks {
182143
}
183144

184145
nativeCompile { finalizedBy(archiveTgz) }
185-
186146
// shadowJar { mergeServiceFiles() }
187147
}
188148

@@ -201,10 +161,4 @@ val niArchiveName
201161
append(".tar.gz")
202162
}
203163

204-
dependencies {
205-
// Dependencies required for native-image build. Use "graalCompileOnly" for compile only deps.
206-
"graalCompileOnly"(libs.graal.sdk)
207-
nativeImageCompileOnly(graal.map { it.output })
208-
compileOnly(libs.graal.sdk)
209-
// "graalImplementation"(libs.classgraph)
210-
}
164+
dependencies { compileOnly(libs.graal.sdk) }

0 commit comments

Comments
 (0)