diff --git a/SchematicSystem_15/build.gradle b/SchematicSystem_15/build.gradle
index cb6a6ae..855ff15 100644
--- a/SchematicSystem_15/build.gradle
+++ b/SchematicSystem_15/build.gradle
@@ -50,7 +50,7 @@ dependencies {
implementation project(":SchematicSystem_Core")
- compileOnly files("${projectDir}/../lib/Spigot-1.15.jar")
- compileOnly files("${projectDir}/../lib/WorldEdit-1.15.jar")
- compileOnly files("${projectDir}/../lib/SpigotCore.jar")
+ compileOnly swdep("Spigot-1.15")
+ compileOnly swdep("WorldEdit-1.15")
+ compileOnly swdep("SpigotCore")
}
diff --git a/SchematicSystem_15/settings.gradle b/SchematicSystem_15/settings.gradle
deleted file mode 100644
index 99722b8..0000000
--- a/SchematicSystem_15/settings.gradle
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2020 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-rootProject.name = 'SchematicSystem_15'
\ No newline at end of file
diff --git a/SchematicSystem_8/build.gradle b/SchematicSystem_8/build.gradle
index afd30df..a53a65f 100644
--- a/SchematicSystem_8/build.gradle
+++ b/SchematicSystem_8/build.gradle
@@ -50,7 +50,7 @@ dependencies {
implementation project(":SchematicSystem_Core")
- compileOnly files("${projectDir}/../lib/Spigot-1.8.jar")
- compileOnly files("${projectDir}/../lib/WorldEdit-1.12.jar")
- compileOnly files("${projectDir}/../lib/SpigotCore.jar")
+ compileOnly swdep("Spigot-1.8")
+ compileOnly swdep("WorldEdit-1.12")
+ compileOnly swdep("SpigotCore")
}
diff --git a/SchematicSystem_Core/build.gradle b/SchematicSystem_Core/build.gradle
index 282fc61..4de5ebf 100644
--- a/SchematicSystem_Core/build.gradle
+++ b/SchematicSystem_Core/build.gradle
@@ -48,7 +48,7 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok:1.18.22'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
- compileOnly files("${projectDir}/../lib/Spigot-1.15.jar")
- compileOnly files("${projectDir}/../lib/WorldEdit-1.15.jar")
- compileOnly files("${projectDir}/../lib/SpigotCore.jar")
+ compileOnly swdep("Spigot-1.15")
+ compileOnly swdep("WorldEdit-1.15")
+ compileOnly swdep("SpigotCore")
}
diff --git a/SchematicSystem_Core/settings.gradle b/SchematicSystem_Core/settings.gradle
deleted file mode 100644
index 0463912..0000000
--- a/SchematicSystem_Core/settings.gradle
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2020 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-rootProject.name = 'SchematicSystem_Core'
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 34ae5ad..b8b1983 100644
--- a/build.gradle
+++ b/build.gradle
@@ -36,6 +36,18 @@ plugins {
id 'com.github.johnrengelman.shadow' version '5.0.0'
}
+ext.swdep = { s ->
+ if (file("${rootDir}/lib/${s}.jar").exists()) {
+ return files("${rootDir}/lib/${s}.jar")
+ } else {
+ if (s.contains("-")) {
+ return "de.steamwar:${s.toLowerCase().replace('-', ':')}"
+ } else {
+ return "de.steamwar:${s.toLowerCase()}:RELEASE"
+ }
+ }
+}
+
group 'de.steamwar'
version ''
@@ -83,6 +95,14 @@ allprojects {
maven {
url = uri('https://libraries.minecraft.net')
}
+
+ maven {
+ url = uri('https://steamwar.de/maven/')
+ credentials {
+ username = steamwarProperties.getProperty("maven.username")
+ password = steamwarProperties.getProperty("maven.password")
+ }
+ }
}
}
diff --git a/settings.gradle b/settings.gradle
index 29bc7e4..cd21dd4 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -19,6 +19,11 @@
rootProject.name = 'SchematicSystem'
-include 'SchematicSystem_8'
-include 'SchematicSystem_15'
-include 'SchematicSystem_Core'
+file('.').listFiles().each {
+ if (!it.isDirectory()) {
+ return
+ }
+ if (new File(it, "build.gradle").exists()) {
+ include(it.name)
+ }
+}