@@ -21,7 +21,9 @@ compileTestKotlin {
2121 compilerOptions. jvmTarget. set(JvmTarget . JVM_17 )
2222}
2323
24- configurations { buildSudachiDict }
24+ configurations {
25+ buildSudachiDict
26+ }
2527
2628dependencies {
2729 buildSudachiDict (project(' :spi' ))
@@ -71,7 +73,6 @@ esTestEnv {
7173 bundlePath = packageDir
7274 systemDic = compileSystemDictionary. get(). outputs. files. singleFile. toPath()
7375 configFile = rootProject. rootDir. toPath(). resolve(" src/test/resources/com/worksap/nlp/lucene/sudachi/ja/sudachi.json" )
74- additionalJars. add(project(" :testlib" ). getTasksByName(' jar' , false ). first(). outputs. files. singleFile. toPath())
7576 addPlugin(" analysis-icu" , downloadIcuPlugin)
7677 addPlugin(' sudachi-sub' , project(' :subplugin' ). getTasksByName(' distZip' , false ). first())
7778}
@@ -95,11 +96,17 @@ test {
9596def distZip = tasks. register(' distZip' , Zip ) {
9697 var esKind = sudachiEs. kind. get()
9798 archiveBaseName. set(" ${ esKind.engine.kind} -${ esKind.version} -$archivesBaseName " )
98- from(
99- project(' :subplugin' ). packageJars. outputs. files,
100- project(' :subplugin' ). embedVersion. outputs. files,
101- project(' :testlib' ). jar. outputs. files,
102- )
99+
100+ // This task creates the test plugin ZIP used by the CI shell scripts.
101+ // We rebuild it from source components to ensure correctness and avoid build order issues.
102+ dependsOn(project(' :subplugin' ). tasks. named(' jar' ), project(' :testlib' ). tasks. named(' jar' ))
103+
104+ from(project(' :subplugin' ). tasks. named(' jar' ))
105+ from(project(' :testlib' ). tasks. named(' jar' ))
106+ from(project(' :subplugin' ). file(' src/main/extras/plugin-descriptor.properties' )) {
107+ into(' /' ) // Ensure descriptor is at the root of the zip
108+ expand(version : project(' :subplugin' ). version, engineVersion : esKind. version, engineKind : esKind. engine. kind)
109+ }
103110}
104111
105112artifacts {
0 commit comments