diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index d3783a93..b7e40e69 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -2,7 +2,6 @@ apply(from= "../gradle/loadProps.gradle.kts") plugins { `java-gradle-plugin` - `kotlin-dsl` groovy } @@ -31,7 +30,3 @@ gradlePlugin { } } } - -configure { - experimentalWarning.set(false) -} diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts deleted file mode 100644 index e69de29b..00000000 diff --git a/buildSrc/src/main/groovy/JniUtils.groovy b/buildSrc/src/main/groovy/JniUtils.groovy index b934581d..bd5b0d63 100644 --- a/buildSrc/src/main/groovy/JniUtils.groovy +++ b/buildSrc/src/main/groovy/JniUtils.groovy @@ -1,5 +1,5 @@ -import dev.nokee.platform.nativebase.OperatingSystemFamily -import dev.nokee.platform.nativebase.TargetMachine +import dev.nokee.runtime.nativebase.OperatingSystemFamily +import dev.nokee.runtime.nativebase.TargetMachine import org.gradle.api.GradleException import org.gradle.api.Project @@ -8,10 +8,12 @@ class JniUtils { String operatingSystemFamily = 'macos' if (targetMachine.operatingSystemFamily.windows) { operatingSystemFamily = 'windows' + } else if (targetMachine.operatingSystemFamily.linux) { + operatingSystemFamily = 'linux' } String architecture = 'x86-64' - if (targetMachine.architecture.'32Bit') { + if (targetMachine.architecture.is32Bit()) { architecture = 'x86' } diff --git a/buildSrc/src/main/groovy/UberJniJarPlugin.groovy b/buildSrc/src/main/groovy/UberJniJarPlugin.groovy index b1d8990d..3e4c9f4e 100644 --- a/buildSrc/src/main/groovy/UberJniJarPlugin.groovy +++ b/buildSrc/src/main/groovy/UberJniJarPlugin.groovy @@ -1,7 +1,7 @@ import dev.nokee.platform.jni.JniJarBinary import dev.nokee.platform.jni.JniLibrary import dev.nokee.platform.jni.JniLibraryExtension -import dev.nokee.platform.nativebase.TargetMachine +import dev.nokee.runtime.nativebase.TargetMachine import groovy.transform.CompileStatic import org.gradle.api.Plugin import org.gradle.api.Project @@ -27,8 +27,8 @@ class UberJniJarPlugin implements Plugin { library.binaries.withType(JniJarBinary).configureEach { if (it.jarTask.isPresent()) it.jarTask.get()?.enabled = false } - if (library.targetMachines.get().size() >= 1) { - logger.info("${project.name}: Merging binaries into the JVM Jar.") + logger.info("${project.name}: Merging binaries into the JVM Jar.") + if (library.targetMachines.get().size() > 1) { for (TargetMachine targetMachine : library.targetMachines.get()) { Provider variant = library.variants .flatMap(targetMachineOf(targetMachine)) @@ -37,6 +37,12 @@ class UberJniJarPlugin implements Plugin { spec.from(variant.map { it.nativeRuntimeFiles }) } } + } else { + library.variants.configureEach { + task.into(it.resourcePath) { CopySpec spec -> + spec.from(it.nativeRuntimeFiles) + } + } } }