diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 6ad9b8d..0000000 --- a/build.gradle +++ /dev/null @@ -1,48 +0,0 @@ -subprojects { - group = 'eu.jonahbauer' - version = '1.0-SNAPSHOT' - - apply plugin: 'java' - - repositories { - mavenCentral() - } - - compileJava { - sourceCompatibility = 17 - targetCompatibility = 17 - } - - ext { - log4j2 = "2.14.1" - lombok = "1.18.22" - - junit = "5.8.1" - mockito = "4.0.0" - } - - dependencies { - implementation "org.jetbrains:annotations:22.0.0" - implementation "com.google.code.gson:gson:2.8.8" - - implementation "org.apache.logging.log4j:log4j-api:$log4j2" - implementation "org.apache.logging.log4j:log4j-core:$log4j2" - implementation "org.apache.logging.log4j:log4j-slf4j-impl:$log4j2" - - testImplementation "org.junit.jupiter:junit-jupiter:$junit" - testImplementation "org.junit.jupiter:junit-jupiter-engine:$junit" - testImplementation "org.mockito:mockito-inline:$mockito" - testImplementation "org.mockito:mockito-junit-jupiter:$mockito" - - compileOnly "org.projectlombok:lombok:$lombok" - annotationProcessor "org.projectlombok:lombok:$lombok" - - testCompileOnly "org.projectlombok:lombok:$lombok" - testAnnotationProcessor "org.projectlombok:lombok:$lombok" - } - - test { - useJUnitPlatform() - maxHeapSize = '256M' - } -} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..0066798 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,55 @@ +subprojects { + apply(plugin = "java-library") + + group = "eu.jonahbauer" + version = "1.0-SNAPSHOT" + + val implementation by configurations + val testImplementation by configurations + val compileOnly by configurations + val annotationProcessor by configurations + val testCompileOnly by configurations + val testAnnotationProcessor by configurations + + repositories { + mavenCentral() + } + + dependencies { + implementation("org.jetbrains:annotations:22.0.0") + implementation("com.google.code.gson:gson:2.8.8") + + implementation("org.apache.logging.log4j:log4j-api:2.14.1") + implementation("org.apache.logging.log4j:log4j-core:2.14.1") + implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.14.1") + + testImplementation("org.junit.jupiter:junit-jupiter:5.8.1") + testImplementation("org.junit.jupiter:junit-jupiter-engine:5.8.1") + testImplementation("org.mockito:mockito-inline:4.0.0") + testImplementation("org.mockito:mockito-junit-jupiter:4.0.0") + + compileOnly("org.projectlombok:lombok:1.18.22") + annotationProcessor("org.projectlombok:lombok:1.18.22") + + testCompileOnly("org.projectlombok:lombok:1.18.22") + testAnnotationProcessor("org.projectlombok:lombok:1.18.22") + } + + tasks { + withType { + sourceCompatibility = "17" + targetCompatibility = "17" + options.encoding = "UTF-8" + } + + withType { + onlyIf { + !project.the()["main"].allSource.isEmpty + } + } + + named("test") { + useJUnitPlatform() + } + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 8c2e219..0000000 --- a/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -/* - * This file was generated by the Gradle 'init' task. - */ - -rootProject.name = 'wizard' -include(':wizard-common') -include(':wizard-client:wizard-client-cli') -include(':wizard-client:wizard-client-libgdx:core') -include(':wizard-client:wizard-client-libgdx:desktop') -include(':wizard-server') -include(':wizard-core') diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..7ce12dc --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,11 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +rootProject.name = "wizard" +include(":wizard-common") +include(":wizard-client:wizard-client-cli") +include(":wizard-client:wizard-client-libgdx:core") +include(":wizard-client:wizard-client-libgdx:desktop") +include(":wizard-server") +include(":wizard-core") diff --git a/wizard-client/build.gradle b/wizard-client/build.gradle deleted file mode 100644 index 4334b09..0000000 --- a/wizard-client/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -subprojects { - dependencies { - implementation project(':wizard-common') - } -} - -description = 'wizard-client' diff --git a/wizard-client/build.gradle.kts b/wizard-client/build.gradle.kts new file mode 100644 index 0000000..45a24b9 --- /dev/null +++ b/wizard-client/build.gradle.kts @@ -0,0 +1,5 @@ +subprojects { + dependencies { + implementation(project(":wizard-common")) + } +} \ No newline at end of file diff --git a/wizard-client/wizard-client-libgdx/build.gradle b/wizard-client/wizard-client-libgdx/build.gradle deleted file mode 100644 index 4916872..0000000 --- a/wizard-client/wizard-client-libgdx/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -subprojects { - ext { - gdxVersion = '1.10.0' - roboVMVersion = '2.3.12' - box2DLightsVersion = '1.5' - ashleyVersion = '1.7.3' - aiVersion = '1.8.2' - gdxControllersVersion = '2.1.0' - } -} - -project(":wizard-client:wizard-client-libgdx:desktop") { - apply plugin: "java-library" - - dependencies { - implementation project(":wizard-client:wizard-client-libgdx:core") - api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion" - api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" - api "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop" - } -} - -project(":wizard-client:wizard-client-libgdx:core") { - apply plugin: "java-library" - - dependencies { - api "com.badlogicgames.gdx:gdx:$gdxVersion" - api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" - } -} diff --git a/wizard-client/wizard-client-libgdx/build.gradle.kts b/wizard-client/wizard-client-libgdx/build.gradle.kts new file mode 100644 index 0000000..d06347c --- /dev/null +++ b/wizard-client/wizard-client-libgdx/build.gradle.kts @@ -0,0 +1,20 @@ + +project(":wizard-client:wizard-client-libgdx:desktop") { + apply(plugin = "java-library") + + dependencies { + implementation(project(":wizard-client:wizard-client-libgdx:core")) + api("com.badlogicgames.gdx:gdx-backend-lwjgl3:1.10.0") + api("com.badlogicgames.gdx:gdx-platform:1.10.0:natives-desktop") + api("com.badlogicgames.gdx:gdx-box2d-platform:1.10.0:natives-desktop") + } +} + +project(":wizard-client:wizard-client-libgdx:core") { + apply(plugin = "java-library") + + dependencies { + api( "com.badlogicgames.gdx:gdx:1.10.0") + api("com.badlogicgames.gdx:gdx-box2d:1.10.0") + } +} diff --git a/wizard-client/wizard-client-libgdx/core/build.gradle b/wizard-client/wizard-client-libgdx/core/build.gradle deleted file mode 100644 index be0393d..0000000 --- a/wizard-client/wizard-client-libgdx/core/build.gradle +++ /dev/null @@ -1 +0,0 @@ -[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' diff --git a/wizard-client/wizard-client-libgdx/core/build.gradle.kts b/wizard-client/wizard-client-libgdx/core/build.gradle.kts new file mode 100644 index 0000000..86f14a0 --- /dev/null +++ b/wizard-client/wizard-client-libgdx/core/build.gradle.kts @@ -0,0 +1,6 @@ +val texturePackerSource = "src/main/textures" +val texturePackerResources = "$buildDir/generated/sources/texturePacker/resources/main" +val texturePackerGeneratedSources = "$buildDir/generated/sources/texturePacker/java/main" + +sourceSets.main.get().java.srcDir(texturePackerGeneratedSources) +sourceSets.main.get().resources.srcDir(texturePackerResources) diff --git a/wizard-client/wizard-client-libgdx/desktop/build.gradle b/wizard-client/wizard-client-libgdx/desktop/build.gradle deleted file mode 100644 index 2e8f573..0000000 --- a/wizard-client/wizard-client-libgdx/desktop/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -plugins { - id 'application' -} - -application { - mainClass = "eu.jonahbauer.wizard.client.libgdx.desktop.DesktopLauncher" - - run { - ignoreExitValue true - } -} - -distributions { - main { - distributionBaseName = 'wizard-client' - } -} \ No newline at end of file diff --git a/wizard-client/wizard-client-libgdx/desktop/build.gradle.kts b/wizard-client/wizard-client-libgdx/desktop/build.gradle.kts new file mode 100644 index 0000000..f670736 --- /dev/null +++ b/wizard-client/wizard-client-libgdx/desktop/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + application +} + +application { + mainClass.set("eu.jonahbauer.wizard.client.libgdx.desktop.DesktopLauncher") + + tasks.withType { + isIgnoreExitValue = true + } +} + +distributions { + main { + distributionBaseName.set("wizard-client") + } +} \ No newline at end of file diff --git a/wizard-common/build.gradle b/wizard-common/build.gradle deleted file mode 100644 index fb36922..0000000 --- a/wizard-common/build.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -description = 'wizard-common' diff --git a/wizard-common/build.gradle.kts b/wizard-common/build.gradle.kts new file mode 100644 index 0000000..e69de29 diff --git a/wizard-core/build.gradle b/wizard-core/build.gradle deleted file mode 100644 index 3e1127b..0000000 --- a/wizard-core/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ - -dependencies { - implementation project(':wizard-common') -} - -description = 'wizard-core' diff --git a/wizard-core/build.gradle.kts b/wizard-core/build.gradle.kts new file mode 100644 index 0000000..d317043 --- /dev/null +++ b/wizard-core/build.gradle.kts @@ -0,0 +1,4 @@ + +dependencies { + implementation(project(":wizard-common")) +} \ No newline at end of file diff --git a/wizard-server/build.gradle b/wizard-server/build.gradle deleted file mode 100644 index 46309b6..0000000 --- a/wizard-server/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ - -dependencies { - implementation project(':wizard-core') -} - -description = 'wizard-server' diff --git a/wizard-server/build.gradle.kts b/wizard-server/build.gradle.kts new file mode 100644 index 0000000..871379d --- /dev/null +++ b/wizard-server/build.gradle.kts @@ -0,0 +1,4 @@ + +dependencies { + implementation(project(":wizard-core")) +}