migration to gradle kotlin dsl

main
Jonah Bauer 3 years ago
parent 6bbdfbc4a6
commit abefa54cd2

@ -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'
}
}

@ -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<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
options.encoding = "UTF-8"
}
withType<Jar> {
onlyIf {
!project.the<SourceSetContainer>()["main"].allSource.isEmpty
}
}
named<Test>("test") {
useJUnitPlatform()
}
}
}

@ -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')

@ -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")

@ -1,7 +0,0 @@
subprojects {
dependencies {
implementation project(':wizard-common')
}
}
description = 'wizard-client'

@ -0,0 +1,5 @@
subprojects {
dependencies {
implementation(project(":wizard-common"))
}
}

@ -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"
}
}

@ -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")
}
}

@ -1 +0,0 @@
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

@ -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)

@ -1,17 +0,0 @@
plugins {
id 'application'
}
application {
mainClass = "eu.jonahbauer.wizard.client.libgdx.desktop.DesktopLauncher"
run {
ignoreExitValue true
}
}
distributions {
main {
distributionBaseName = 'wizard-client'
}
}

@ -0,0 +1,17 @@
plugins {
application
}
application {
mainClass.set("eu.jonahbauer.wizard.client.libgdx.desktop.DesktopLauncher")
tasks.withType<JavaExec> {
isIgnoreExitValue = true
}
}
distributions {
main {
distributionBaseName.set("wizard-client")
}
}

@ -1,2 +0,0 @@
description = 'wizard-common'

@ -1,6 +0,0 @@
dependencies {
implementation project(':wizard-common')
}
description = 'wizard-core'

@ -0,0 +1,4 @@
dependencies {
implementation(project(":wizard-common"))
}

@ -1,6 +0,0 @@
dependencies {
implementation project(':wizard-core')
}
description = 'wizard-server'

@ -0,0 +1,4 @@
dependencies {
implementation(project(":wizard-core"))
}
Loading…
Cancel
Save