@@ -21,7 +21,9 @@ compileTestKotlin {
21
21
compilerOptions. jvmTarget. set(JvmTarget . JVM_17 )
22
22
}
23
23
24
- configurations { buildSudachiDict }
24
+ configurations {
25
+ buildSudachiDict
26
+ }
25
27
26
28
dependencies {
27
29
buildSudachiDict (project(' :spi' ))
@@ -71,7 +73,6 @@ esTestEnv {
71
73
bundlePath = packageDir
72
74
systemDic = compileSystemDictionary. get(). outputs. files. singleFile. toPath()
73
75
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())
75
76
addPlugin(" analysis-icu" , downloadIcuPlugin)
76
77
addPlugin(' sudachi-sub' , project(' :subplugin' ). getTasksByName(' distZip' , false ). first())
77
78
}
@@ -95,11 +96,17 @@ test {
95
96
def distZip = tasks. register(' distZip' , Zip ) {
96
97
var esKind = sudachiEs. kind. get()
97
98
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
+ }
103
110
}
104
111
105
112
artifacts {
0 commit comments