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
8585testplugins.settings.gradle.kts
8686spongeforge.settings.gradle.kts
8787projects.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")
2525val transformersProject = commonProject.project(" :modlauncher-transformers" )
2626val libraryManagerProject = commonProject.project(" :library-manager" )
2727val testPluginsProject: Project ? = rootProject.subprojects.find { " testplugins" == it.name }
28+ val userPluginsProject: Project ? = rootProject.subprojects.find { " userplugins" == it.name }
2829
2930val apiVersion: String by project
3031val minecraftVersion: String by project
@@ -215,6 +216,9 @@ dependencies {
215216 testPluginsProject?.also {
216217 runtimeOnly(project(it.path))
217218 }
219+ userPluginsProject?.also {
220+ runtimeOnly(project(it.path))
221+ }
218222}
219223
220224val 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!!
2121val transformersProject = commonProject.project(" :modlauncher-transformers" )
2222val libraryManagerProject = commonProject.project(" :library-manager" )
2323val testPluginsProject: Project ? = rootProject.subprojects.find { " testplugins" == it.name }
24+ val userPluginsProject: Project ? = rootProject.subprojects.find { " userplugins" == it.name }
2425
2526val apiVersion: String by project
2627val minecraftVersion: String by project
@@ -305,6 +306,9 @@ tasks {
305306
306307 dependsOn(it.tasks.classes)
307308 }
309+ userPluginsProject?.also {
310+ dependsOn(it.tasks.classes)
311+ }
308312
309313 argumentProviders + = CommandLineArgumentProvider {
310314 mixinConfigs.asSequence()
Original file line number Diff line number Diff line change @@ -110,6 +110,22 @@ if (projects.contains("neoforge")) {
110110 project(" :SpongeNeo" ).projectDir = file(" neoforge" )
111111}
112112
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+
113129if (projects.contains(" testplugins" )) {
114130 include(" :testplugins" )
115131}
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")
1414val transformersProject = commonProject.project(" :modlauncher-transformers" )
1515val libraryManagerProject = commonProject.project(" :library-manager" )
1616val testPluginsProject: Project ? = rootProject.subprojects.find { " testplugins" == it.name }
17+ val userPluginsProject: Project ? = rootProject.subprojects.find { " userplugins" == it.name }
1718
1819val apiVersion: String by project
1920val apiJavaTarget: String by project
@@ -246,6 +247,9 @@ dependencies {
246247 testPluginsProject?.also {
247248 runtimeOnly(project(it.path))
248249 }
250+ userPluginsProject?.also {
251+ runtimeOnly(project(it.path))
252+ }
249253}
250254
251255minecraft {
You can’t perform that action at this time.
0 commit comments