Skip to content

Commit

Permalink
rm extra[ lblibs ] from build
Browse files Browse the repository at this point in the history
  • Loading branch information
walterxie committed Feb 21, 2024
1 parent f267a8e commit 52676f7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lphybeast-ext/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -53,7 +56,6 @@ tasks.compileJava.get().dependsOn("installLPhyBEAST")

// unzip lphybeast-*.zip to ${buildDir}/lphybeast/
val lb = tasks.register<Sync>("installLPhyBEAST") {
val outDir = "${buildDir}/lphybeast"
zippedConfig.resolvedConfiguration.resolvedArtifacts.forEach({
println(name + " --- " + it.file.name)
if (it.file.name.endsWith("zip")) {
Expand All @@ -63,8 +65,8 @@ val lb = tasks.register<Sync>("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 ++++++++//
Expand Down

0 comments on commit 52676f7

Please sign in to comment.