Skip to content

Commit 676c419

Browse files
committed
minor refactor around arch-detect
the hope was to fix the deprecation, but this doesn't help. it does clean up a few things though
1 parent c0991dd commit 676c419

5 files changed

Lines changed: 6 additions & 10 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const val ARCH_DETECT_CONFIGURATION_NAME = "archDetectConfiguration"

conventions/src/main/kotlin/tel.schich.javacan.convention.arch-detect.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import org.gradle.kotlin.dsl.getValue
2-
import org.gradle.kotlin.dsl.provideDelegate
3-
import org.gradle.kotlin.dsl.registering
4-
51
plugins {
62
id("tel.schich.javacan.convention.published")
73
}

conventions/src/main/kotlin/tel.schich.javacan.convention.native.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ plugins {
99

1010
val ci = System.getenv("CI") != null
1111

12-
val archDetectConfiguration by configurations.registering {
12+
val archDetectConfiguration = configurations.register(ARCH_DETECT_CONFIGURATION_NAME) {
1313
isCanBeConsumed = true
14-
isCanBeResolved = false
1514
}
1615

1716
val jniGluePath: Directory = project.layout.buildDirectory.get().dir("jni/${project.name}")

core-arch-detect/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ plugins {
22
id("tel.schich.javacan.convention.arch-detect")
33
}
44

5-
val nativeLibs = configurations.named("nativeLibs")
5+
val nativeLibs by configurations.getting
66

77
dependencies {
88
api(project(":core"))
9-
nativeLibs(project(mapOf("path" to ":core", "configuration" to "archDetectConfiguration")))
9+
nativeLibs(project(mapOf("path" to ":core", "configuration" to ARCH_DETECT_CONFIGURATION_NAME)))
1010
}
1111

1212
publishing.publications.withType<MavenPublication>().configureEach {

epoll-arch-detect/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ plugins {
22
id("tel.schich.javacan.convention.arch-detect")
33
}
44

5-
val nativeLibs = configurations.named("nativeLibs")
5+
val nativeLibs by configurations.getting
66

77
dependencies {
88
api(project(":epoll"))
9-
nativeLibs(project(mapOf("path" to ":epoll", "configuration" to "archDetectConfiguration")))
9+
nativeLibs(project(mapOf("path" to ":epoll", "configuration" to ARCH_DETECT_CONFIGURATION_NAME)))
1010
}
1111

1212
publishing.publications.withType<MavenPublication>().configureEach {

0 commit comments

Comments
 (0)