File tree Expand file tree Collapse file tree 7 files changed +43
-1
lines changed Expand file tree Collapse file tree 7 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -85,3 +85,6 @@ buildSrc/src/api
85
85
testplugins.settings.gradle.kts
86
86
spongeforge.settings.gradle.kts
87
87
projects.properties
88
+ # External plugin projects
89
+ /userplugins /userPluginBuilds
90
+ /userplugins /userPlugins
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ val bootstrapDevProject = commonProject.project(":bootstrap-dev")
25
25
val transformersProject = commonProject.project(" :modlauncher-transformers" )
26
26
val libraryManagerProject = commonProject.project(" :library-manager" )
27
27
val testPluginsProject: Project ? = rootProject.subprojects.find { " testplugins" == it.name }
28
+ val userPluginsProject: Project ? = rootProject.subprojects.find { " userplugins" == it.name }
28
29
29
30
val apiVersion: String by project
30
31
val minecraftVersion: String by project
@@ -215,6 +216,9 @@ dependencies {
215
216
testPluginsProject?.also {
216
217
runtimeOnly(project(it.path))
217
218
}
219
+ userPluginsProject?.also {
220
+ runtimeOnly(project(it.path))
221
+ }
218
222
}
219
223
220
224
val awFiles: Set <File > = files(main.get().resources, forgeMain.resources).filter { it.name.endsWith(" .accesswidener" ) }.files
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ val commonProject = parent!!
21
21
val transformersProject = commonProject.project(" :modlauncher-transformers" )
22
22
val libraryManagerProject = commonProject.project(" :library-manager" )
23
23
val testPluginsProject: Project ? = rootProject.subprojects.find { " testplugins" == it.name }
24
+ val userPluginsProject: Project ? = rootProject.subprojects.find { " userplugins" == it.name }
24
25
25
26
val apiVersion: String by project
26
27
val minecraftVersion: String by project
@@ -305,6 +306,9 @@ tasks {
305
306
306
307
dependsOn(it.tasks.classes)
307
308
}
309
+ userPluginsProject?.also {
310
+ dependsOn(it.tasks.classes)
311
+ }
308
312
309
313
argumentProviders + = CommandLineArgumentProvider {
310
314
mixinConfigs.asSequence()
Original file line number Diff line number Diff line change @@ -110,6 +110,22 @@ if (projects.contains("neoforge")) {
110
110
project(" :SpongeNeo" ).projectDir = file(" neoforge" )
111
111
}
112
112
113
+ if (projects.contains(" userplugins" )) {
114
+ include(" :userplugins" )
115
+ val userPluginBuilds = file(" userplugins/userPluginBuilds" )
116
+ if (userPluginBuilds.exists()) {
117
+ userPluginBuilds.readLines().filter { ! it.startsWith(" #" ) && it.isNotBlank()}.forEach {
118
+ includeBuild(it)
119
+ }
120
+ } else {
121
+ userPluginBuilds.writeText(" # Add paths to your plugin projects here" )
122
+ }
123
+ val userPlugins = file(" userplugins/userPlugins" )
124
+ if (userPlugins.exists().not ()) {
125
+ userPlugins.writeText(" # Add dependencies to your plugins here" )
126
+ }
127
+ }
128
+
113
129
if (projects.contains(" testplugins" )) {
114
130
include(" :testplugins" )
115
131
}
Original file line number Diff line number Diff line change
1
+ val apiVersion: String by project
2
+
3
+ dependencies {
4
+ annotationProcessor(implementation(" org.spongepowered:spongeapi:$apiVersion " )!! )
5
+ val userPlugins = file(" userPlugins" )
6
+ if (userPlugins.exists()) {
7
+ userPlugins.readLines().filter { ! it.startsWith(" #" ) && it.isNotBlank() }.forEach {
8
+ implementation(it)
9
+ }
10
+ }
11
+ }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ val bootstrapDevProject = commonProject.project(":bootstrap-dev")
14
14
val transformersProject = commonProject.project(" :modlauncher-transformers" )
15
15
val libraryManagerProject = commonProject.project(" :library-manager" )
16
16
val testPluginsProject: Project ? = rootProject.subprojects.find { " testplugins" == it.name }
17
+ val userPluginsProject: Project ? = rootProject.subprojects.find { " userplugins" == it.name }
17
18
18
19
val apiVersion: String by project
19
20
val apiJavaTarget: String by project
@@ -246,6 +247,9 @@ dependencies {
246
247
testPluginsProject?.also {
247
248
runtimeOnly(project(it.path))
248
249
}
250
+ userPluginsProject?.also {
251
+ runtimeOnly(project(it.path))
252
+ }
249
253
}
250
254
251
255
minecraft {
You can’t perform that action at this time.
0 commit comments