From 52676f7749a16b278d06c2ff3c3e6ad44643907a Mon Sep 17 00:00:00 2001 From: Walter Date: Wed, 21 Feb 2024 15:32:37 +1300 Subject: [PATCH] rm extra[ lblibs ] from build --- lphybeast-ext/build.gradle.kts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lphybeast-ext/build.gradle.kts b/lphybeast-ext/build.gradle.kts index a6c6ab3..5ef00ad 100644 --- a/lphybeast-ext/build.gradle.kts +++ b/lphybeast-ext/build.gradle.kts @@ -23,6 +23,8 @@ val beast2Jars = fileTree("lib") { exclude("**/*-sources.jar") } +val outDir = "${buildDir}/lphybeast" + dependencies { /** * The behaviour of this default version declaration chooses any available highest version first. @@ -38,8 +40,9 @@ dependencies { //*** lphybeast + ... ***// // cannot use "version" in zippedConfig zippedConfig("io.github.linguaphylo:lphybeast:1.1.0-SNAPSHOT") -// implementation(fileTree("dir" to "${lb.get().outputs.dir("lib")}", "include" to "**/*.jar")) - api(files( { lb.get().extra["lblibs"] } )) + // it must run installLPhyBEAST to unzip lphybeast.zip and create ${outDir}/lib, + // the build is cleaned, or lphybeast version is renewed. + api(fileTree("dir" to "${outDir}/lib", "include" to "**/*.jar")) api(fileTree("lib-test")) // test api not working @@ -53,7 +56,6 @@ tasks.compileJava.get().dependsOn("installLPhyBEAST") // unzip lphybeast-*.zip to ${buildDir}/lphybeast/ val lb = tasks.register("installLPhyBEAST") { - val outDir = "${buildDir}/lphybeast" zippedConfig.resolvedConfiguration.resolvedArtifacts.forEach({ println(name + " --- " + it.file.name) if (it.file.name.endsWith("zip")) { @@ -63,8 +65,8 @@ val lb = tasks.register("installLPhyBEAST") { into(outDir) } }) - extra["lblibs"] = fileTree("dir" to "${outDir}/lib", "include" to "**/*.jar") - extra["lbsrc"] = fileTree("dir" to "${outDir}/src", "include" to "**/*-sources.jar") +// extra["lblibs"] = fileTree("dir" to "${outDir}/lib", "include" to "**/*.jar") +// extra["lbsrc"] = fileTree("dir" to "${outDir}/src", "include" to "**/*-sources.jar") } //++++++++ release ++++++++//