From 341cc9c0f7286b2f759e398ce4f3c180fbde5cc9 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 29 Jan 2022 14:10:11 +0100 Subject: [PATCH] Dependency inversion --- BauSystem_15/build.gradle | 2 +- BauSystem_API/build.gradle | 52 ------------------- BauSystem_API/settings.gradle | 20 ------- BauSystem_Main/build.gradle | 3 -- .../src/de/steamwar/bausystem/SWUtils.java | 0 .../detonator/AbstractDetonatorEntity.java | 0 .../features/detonator/Detoblock.java | 0 .../simulator/AbstractSimulatorEntity.java | 0 .../features/tracer/AbstractTraceEntity.java | 0 .../features/warp/AbstractWarpEntity.java | 0 .../de/steamwar/bausystem/region/Color.java | 0 .../bausystem/region/PasteOptions.java | 0 .../de/steamwar/bausystem/region/Point.java | 0 .../bausystem/shared/AbstractEntity.java | 0 .../de/steamwar/bausystem/shared/Pair.java | 0 .../bausystem/shared/ReferenceCounter.java | 0 .../steamwar/bausystem/shared/SizedStack.java | 0 build.gradle | 1 + 18 files changed, 2 insertions(+), 76 deletions(-) delete mode 100644 BauSystem_API/build.gradle delete mode 100644 BauSystem_API/settings.gradle rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/SWUtils.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/features/detonator/AbstractDetonatorEntity.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/features/detonator/Detoblock.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/features/simulator/AbstractSimulatorEntity.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/features/tracer/AbstractTraceEntity.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/features/warp/AbstractWarpEntity.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/region/Color.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/region/PasteOptions.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/region/Point.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/shared/AbstractEntity.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/shared/Pair.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/shared/ReferenceCounter.java (100%) rename {BauSystem_API => BauSystem_Main}/src/de/steamwar/bausystem/shared/SizedStack.java (100%) diff --git a/BauSystem_15/build.gradle b/BauSystem_15/build.gradle index 48ff7ae9..0d35f827 100644 --- a/BauSystem_15/build.gradle +++ b/BauSystem_15/build.gradle @@ -48,7 +48,7 @@ dependencies { annotationProcessor 'org.projectlombok:lombok:1.18.22' testAnnotationProcessor 'org.projectlombok:lombok:1.18.22' - implementation project(":BauSystem_API") + implementation project(":BauSystem_Main") compileOnly files("${projectDir}/../lib/Spigot-1.15.jar") compileOnly files("${projectDir}/../lib/WorldEdit-1.15.jar") diff --git a/BauSystem_API/build.gradle b/BauSystem_API/build.gradle deleted file mode 100644 index 19035278..00000000 --- a/BauSystem_API/build.gradle +++ /dev/null @@ -1,52 +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 . - */ - -plugins { - id 'base' - id 'java' -} - -group 'steamwar' -version '1.0' - -compileJava.options.encoding = 'UTF-8' - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -sourceSets { - main { - java { - srcDirs = ['src/'] - } - resources { - srcDirs = ['src/'] - exclude '**/*.java', '**/*.kt' - } - } -} - -dependencies { - compileOnly 'org.projectlombok:lombok:1.18.22' - testCompileOnly 'org.projectlombok:lombok:1.18.22' - annotationProcessor 'org.projectlombok:lombok:1.18.22' - testAnnotationProcessor 'org.projectlombok:lombok:1.18.22' - - compileOnly files("${projectDir}/../lib/Spigot-1.15.jar") -} \ No newline at end of file diff --git a/BauSystem_API/settings.gradle b/BauSystem_API/settings.gradle deleted file mode 100644 index a0fb288d..00000000 --- a/BauSystem_API/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 = 'BauSystem_API' \ No newline at end of file diff --git a/BauSystem_Main/build.gradle b/BauSystem_Main/build.gradle index 1b2cd5c3..2f4feff1 100644 --- a/BauSystem_Main/build.gradle +++ b/BauSystem_Main/build.gradle @@ -43,9 +43,6 @@ sourceSets { } dependencies { - implementation project(":BauSystem_15") - implementation project(":BauSystem_API") - implementation 'yoyosource:YAPION:0.25.3' // implementation files("${projectDir}/../lib/YAPION-SNAPSHOT.jar") diff --git a/BauSystem_API/src/de/steamwar/bausystem/SWUtils.java b/BauSystem_Main/src/de/steamwar/bausystem/SWUtils.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/SWUtils.java rename to BauSystem_Main/src/de/steamwar/bausystem/SWUtils.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/features/detonator/AbstractDetonatorEntity.java b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/AbstractDetonatorEntity.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/features/detonator/AbstractDetonatorEntity.java rename to BauSystem_Main/src/de/steamwar/bausystem/features/detonator/AbstractDetonatorEntity.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/features/detonator/Detoblock.java b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detoblock.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/features/detonator/Detoblock.java rename to BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detoblock.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/features/simulator/AbstractSimulatorEntity.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/AbstractSimulatorEntity.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/features/simulator/AbstractSimulatorEntity.java rename to BauSystem_Main/src/de/steamwar/bausystem/features/simulator/AbstractSimulatorEntity.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/features/tracer/AbstractTraceEntity.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/AbstractTraceEntity.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/features/tracer/AbstractTraceEntity.java rename to BauSystem_Main/src/de/steamwar/bausystem/features/tracer/AbstractTraceEntity.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/features/warp/AbstractWarpEntity.java b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/AbstractWarpEntity.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/features/warp/AbstractWarpEntity.java rename to BauSystem_Main/src/de/steamwar/bausystem/features/warp/AbstractWarpEntity.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/region/Color.java b/BauSystem_Main/src/de/steamwar/bausystem/region/Color.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/region/Color.java rename to BauSystem_Main/src/de/steamwar/bausystem/region/Color.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/region/PasteOptions.java b/BauSystem_Main/src/de/steamwar/bausystem/region/PasteOptions.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/region/PasteOptions.java rename to BauSystem_Main/src/de/steamwar/bausystem/region/PasteOptions.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/region/Point.java b/BauSystem_Main/src/de/steamwar/bausystem/region/Point.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/region/Point.java rename to BauSystem_Main/src/de/steamwar/bausystem/region/Point.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/shared/AbstractEntity.java b/BauSystem_Main/src/de/steamwar/bausystem/shared/AbstractEntity.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/shared/AbstractEntity.java rename to BauSystem_Main/src/de/steamwar/bausystem/shared/AbstractEntity.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/shared/Pair.java b/BauSystem_Main/src/de/steamwar/bausystem/shared/Pair.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/shared/Pair.java rename to BauSystem_Main/src/de/steamwar/bausystem/shared/Pair.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/shared/ReferenceCounter.java b/BauSystem_Main/src/de/steamwar/bausystem/shared/ReferenceCounter.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/shared/ReferenceCounter.java rename to BauSystem_Main/src/de/steamwar/bausystem/shared/ReferenceCounter.java diff --git a/BauSystem_API/src/de/steamwar/bausystem/shared/SizedStack.java b/BauSystem_Main/src/de/steamwar/bausystem/shared/SizedStack.java similarity index 100% rename from BauSystem_API/src/de/steamwar/bausystem/shared/SizedStack.java rename to BauSystem_Main/src/de/steamwar/bausystem/shared/SizedStack.java diff --git a/build.gradle b/build.gradle index 0392b342..6ad8376b 100644 --- a/build.gradle +++ b/build.gradle @@ -80,6 +80,7 @@ allprojects { dependencies { implementation project(":BauSystem_Main") + implementation project(":BauSystem_15") } task buildResources(type: Copy) {