@@ -52,12 +52,14 @@ class TabooLibPlugin implements Plugin<Project> {
52
52
} catch (Throwable ignored) {
53
53
}
54
54
55
- project. configurations. compileClasspath. extendsFrom(taboo)
55
+ // 继承 "taboo" 配置
56
+ project. configurations. implementation. extendsFrom(taboo)
57
+
56
58
// com.mojang:datafixerupper:4.0.26
57
- project. dependencies. add(' compileOnly ' , ' com.mojang:datafixerupper:4.0.26' )
59
+ project. dependencies. add(' implementation ' , ' com.mojang:datafixerupper:4.0.26' )
58
60
// org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3
59
61
if (tabooExt. version. coroutines != null ) {
60
- project. dependencies. add(' compileOnly ' , ' org.jetbrains.kotlinx:kotlinx-coroutines-core:' + tabooExt. version. coroutines)
62
+ project. dependencies. add(' implementation ' , ' org.jetbrains.kotlinx:kotlinx-coroutines-core:' + tabooExt. version. coroutines)
61
63
}
62
64
63
65
// subprojects
@@ -66,13 +68,21 @@ class TabooLibPlugin implements Plugin<Project> {
66
68
if (api || isIncludeModule(it) && ! tabooExt. subproject) {
67
69
project. configurations. taboo. dependencies. add(dep)
68
70
} else {
69
- project. configurations. compileOnly . dependencies. add(dep)
71
+ project. configurations. implementation . dependencies. add(dep)
70
72
}
71
73
}
72
74
73
75
project. tasks. jar. finalizedBy(tabooTask)
74
76
project. tasks. jar. configure { Jar task ->
75
- task. from(taboo. collect { it. isDirectory() ? it : project. zipTree(it) })
77
+ task. from(taboo. collect {
78
+ if (it. isDirectory()) {
79
+ it
80
+ } else if (it. name. endsWith(" .jar" )) {
81
+ project. zipTree(it)
82
+ } else {
83
+ project. files(it)
84
+ }
85
+ })
76
86
task. duplicatesStrategy = DuplicatesStrategy . EXCLUDE
77
87
if (api) {
78
88
task. getArchiveClassifier(). set(" api" )
0 commit comments