DEADSOFTWARE

Move dependencies inside module scripts
authorfredboy <fredboy@protonmail.com>
Tue, 14 May 2024 11:26:34 +0000 (18:26 +0700)
committerfredboy <fredboy@protonmail.com>
Tue, 14 May 2024 11:26:34 +0000 (18:26 +0700)
android/build.gradle
build.gradle
core/build.gradle
desktop/build.gradle

index 80d010c8221e89caec14c6e48b4233ea2044ae40..bf1af009dae215b66422a87bff325fc37e8d50f4 100644 (file)
@@ -1,4 +1,9 @@
+buildscript {
+    configurations { natives }
+}
+
 plugins {
+    id "com.android.application"
     id "kotlin-android"
 }
 
@@ -123,4 +128,18 @@ task run(type: Exec) {
 
     def adb = path + "/platform-tools/adb"
     commandLine "$adb", 'shell', 'am', 'start', '-n', 'ru.deadsoftware.cavedroid/ru.deadsoftware.cavedroid.AndroidLauncher'
+}
+
+dependencies {
+    implementation project(":core")
+    implementation platform("org.jetbrains.kotlin:kotlin-bom:$kotlinVersion")
+    api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
+    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
+    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
+    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
+    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
+
+    configurations.implementation {
+        exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
+    }
 }
\ No newline at end of file
index 2a9831aeabf8fd040f5b1bb7324d24a877918243..e782b875c13cf50c9771e87959f406be7cdb817f 100644 (file)
@@ -1,11 +1,11 @@
 buildscript {
-
     ext {
         appName = "CaveDroid"
         gdxVersion = '1.12.0'
         guavaVersion = '28.1'
         daggerVersion = '2.51.1'
-        kotlinVersion = '1.9.23'
+        kotlinVersion = '1.9.24'
+        kspVersion = '1.9.24-1.0.20'
         kotlinSerializationVersion = '1.6.3'
     }
 
@@ -24,7 +24,6 @@ buildscript {
 }
 
 allprojects {
-
     version = 'alpha0.9.2'
 
     repositories {
@@ -36,49 +35,3 @@ allprojects {
         maven { url "https://jitpack.io" }
     }
 }
-
-project(":desktop") {
-    apply plugin: "java-library"
-
-    dependencies {
-        implementation project(":core")
-        implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion"
-        api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
-        api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
-    }
-}
-
-project(":android") {
-    apply plugin: "android"
-
-    configurations { natives }
-
-    dependencies {
-        implementation project(":core")
-        implementation platform("org.jetbrains.kotlin:kotlin-bom:1.9.23")
-        api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
-        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
-        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
-        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
-        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
-
-        configurations.implementation {
-            exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
-        }
-    }
-}
-
-project(":core") {
-    apply plugin: "java-library"
-
-
-    dependencies {
-        api "com.badlogicgames.gdx:gdx:$gdxVersion"
-        api "com.google.guava:guava:$guavaVersion-android"
-        api "com.google.dagger:dagger:$daggerVersion"
-        implementation 'org.jetbrains:annotations:23.1.0'
-        implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
-        implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion"
-        annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
-    }
-}
\ No newline at end of file
index cdf2ee7e4708ffec3ab49447cc63298a1f77caab..4837be72094456afd7345ef288a2a9b0140a35bf 100644 (file)
@@ -1,12 +1,22 @@
 plugins {
+    id "java-library"
     id "org.jetbrains.kotlin.jvm"
     id "kotlin"
     id "idea"
     id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlinVersion"
 }
 
-sourceCompatibility = 17
+java.targetCompatibility = JavaVersion.VERSION_17
+java.sourceCompatibility = JavaVersion.VERSION_17
 
-sourceSets.main.java.srcDirs = [ "src/" ]
+sourceSets.main.java.srcDirs = ["src/"]
 
-java.targetCompatibility = JavaVersion.VERSION_17
\ No newline at end of file
+dependencies {
+    api "com.badlogicgames.gdx:gdx:$gdxVersion"
+    api "com.google.guava:guava:$guavaVersion-android"
+    api "com.google.dagger:dagger:$daggerVersion"
+    implementation 'org.jetbrains:annotations:23.1.0'
+    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
+    implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion"
+    annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
+}
\ No newline at end of file
index 70a63ba56bc3d5f3207941b4c50ac64eab09ee3e..04317e4a995c6299132e0aa0225ce17e69d005de 100644 (file)
@@ -1,10 +1,13 @@
 plugins {
+    id 'java-library'
     id 'kotlin'
     id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlinVersion"
 }
 
-sourceCompatibility = 17
-sourceSets.main.java.srcDirs = [ "src/" ]
+java.targetCompatibility = JavaVersion.VERSION_17
+java.sourceCompatibility = JavaVersion.VERSION_1_8
+
+sourceSets.main.java.srcDirs = ["src/"]
 sourceSets.main.resources.srcDirs = ["../android/assets"]
 
 project.ext.mainClassName = "ru.deadsoftware.cavedroid.desktop.DesktopLauncher"
@@ -48,5 +51,11 @@ task dist(type: Jar) {
     with jar
 }
 
+dist.dependsOn classes
 
-dist.dependsOn classes
\ No newline at end of file
+dependencies {
+    implementation project(":core")
+    implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion"
+    api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
+    api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
+}