2020-05-19 04:14:01 +07:00
|
|
|
import com.unciv.build.BuildConfig.gdxVersion
|
|
|
|
import com.unciv.build.BuildConfig.roboVMVersion
|
|
|
|
|
2023-05-10 15:46:16 +07:00
|
|
|
plugins {
|
|
|
|
id("io.gitlab.arturbosch.detekt").version("1.23.0-RC3")
|
|
|
|
}
|
2021-08-20 20:02:44 +07:00
|
|
|
|
|
|
|
// You'll still get kotlin-reflect-1.3.70.jar in your classpath, but will no longer be used
|
|
|
|
configurations.all { resolutionStrategy {
|
2021-09-05 04:28:21 +07:00
|
|
|
force("org.jetbrains.kotlin:kotlin-reflect:${com.unciv.build.BuildConfig.kotlinVersion}")
|
2021-08-20 20:02:44 +07:00
|
|
|
} }
|
|
|
|
|
|
|
|
|
2020-05-19 04:14:01 +07:00
|
|
|
buildscript {
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
// Chinese mirrors for quicker loading for chinese devs - uncomment if you're chinese
|
2022-08-29 11:34:49 +07:00
|
|
|
// maven{ url = uri("https://maven.aliyun.com/repository/central") }
|
2021-03-04 23:56:05 +07:00
|
|
|
// maven{ url = uri("https://maven.aliyun.com/repository/google") }
|
|
|
|
// maven{ url = uri("https://maven.aliyun.com/repository/gradle-plugin") }
|
2020-05-19 04:14:01 +07:00
|
|
|
mavenCentral()
|
2022-05-13 19:16:54 +07:00
|
|
|
google() // needed for com.android.tools.build:gradle
|
2020-05-19 04:14:01 +07:00
|
|
|
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
|
2021-04-20 01:41:47 +07:00
|
|
|
gradlePluginPortal()
|
2020-05-19 04:14:01 +07:00
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${com.unciv.build.BuildConfig.kotlinVersion}")
|
|
|
|
classpath("de.richsource.gradle.plugins:gwt-gradle-plugin:0.6")
|
2023-06-11 16:42:36 +07:00
|
|
|
classpath("com.android.tools.build:gradle:7.4.2")
|
2020-05-19 04:14:01 +07:00
|
|
|
classpath("com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1")
|
|
|
|
}
|
|
|
|
}
|
2022-03-28 21:36:42 +07:00
|
|
|
|
2020-05-19 04:14:01 +07:00
|
|
|
allprojects {
|
2022-03-28 21:36:42 +07:00
|
|
|
apply(plugin = "eclipse")
|
|
|
|
apply(plugin = "idea")
|
2020-05-19 04:14:01 +07:00
|
|
|
|
|
|
|
|
|
|
|
version = "1.0.1"
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
// Chinese mirrors for quicker loading for chinese devs - uncomment if you're chinese
|
2022-08-29 11:34:49 +07:00
|
|
|
// maven{ url = uri("https://maven.aliyun.com/repository/central") }
|
2020-09-06 00:38:33 +07:00
|
|
|
// maven{ url = uri("https://maven.aliyun.com/repository/google") }
|
2020-05-19 04:14:01 +07:00
|
|
|
mavenCentral()
|
2022-05-13 19:16:54 +07:00
|
|
|
google()
|
2020-05-19 04:14:01 +07:00
|
|
|
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
|
|
|
|
maven { url = uri("https://oss.sonatype.org/content/repositories/releases/") }
|
2022-03-28 21:36:42 +07:00
|
|
|
maven { url = uri("https://jitpack.io") } // for java-discord-rpc
|
2020-05-19 04:14:01 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
project(":desktop") {
|
|
|
|
apply(plugin = "kotlin")
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
"implementation"(project(":core"))
|
2021-11-03 05:15:47 +07:00
|
|
|
"implementation"("com.badlogicgames.gdx:gdx-backend-lwjgl3:${gdxVersion}")
|
2020-05-19 04:14:01 +07:00
|
|
|
"implementation"("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop")
|
|
|
|
|
2021-11-03 05:15:47 +07:00
|
|
|
"implementation"("com.badlogicgames.gdx:gdx-tools:$gdxVersion") {
|
|
|
|
exclude("com.badlogicgames.gdx", "gdx-backend-lwjgl")
|
|
|
|
}
|
2020-05-19 04:14:01 +07:00
|
|
|
|
|
|
|
"implementation"("com.github.MinnDevelopment:java-discord-rpc:v2.0.1")
|
2022-08-29 11:34:49 +07:00
|
|
|
|
2022-05-06 12:42:30 +07:00
|
|
|
"implementation"("net.java.dev.jna:jna:5.11.0")
|
|
|
|
"implementation"("net.java.dev.jna:jna-platform:5.11.0")
|
2022-05-09 01:22:43 +07:00
|
|
|
}
|
|
|
|
}
|
2022-05-06 12:42:30 +07:00
|
|
|
|
2022-05-09 01:22:43 +07:00
|
|
|
// For server-side
|
|
|
|
project(":server") {
|
|
|
|
apply(plugin = "kotlin")
|
Unciv server (#6384)
* Background implementation for Unciv server with ktor.
Server ip in settings, able to copy your own ip and copy ip from clipboard for easy sharing, created stub for the client-server data transfer. No actual data storage or server implementation.
* Unciv server round 2 - implementing crud for files and it works!
metadata seems to only be in use for mutex, which is currently unused
That's all for today
* When starting a new multiplayer game the files are correctly saved in the server, and the server can return the files, but the function in the game to retrieve the game info is non-blocking so it doesn't work. Still, progress!
* Changed the Gdx http to basic Java http, as used for Dropbox, and now everything works!!!!
* Documentation for running and using the server
* Better texts, translations, etc
* Trog is right this should be a PUT not POST
2022-03-22 02:05:02 +07:00
|
|
|
|
2022-05-09 01:22:43 +07:00
|
|
|
dependencies {
|
|
|
|
// For server-side
|
Unciv server (#6384)
* Background implementation for Unciv server with ktor.
Server ip in settings, able to copy your own ip and copy ip from clipboard for easy sharing, created stub for the client-server data transfer. No actual data storage or server implementation.
* Unciv server round 2 - implementing crud for files and it works!
metadata seems to only be in use for mutex, which is currently unused
That's all for today
* When starting a new multiplayer game the files are correctly saved in the server, and the server can return the files, but the function in the game to retrieve the game info is non-blocking so it doesn't work. Still, progress!
* Changed the Gdx http to basic Java http, as used for Dropbox, and now everything works!!!!
* Documentation for running and using the server
* Better texts, translations, etc
* Trog is right this should be a PUT not POST
2022-03-22 02:05:02 +07:00
|
|
|
"implementation"("io.ktor:ktor-server-core:1.6.8")
|
|
|
|
"implementation"("io.ktor:ktor-server-netty:1.6.8")
|
|
|
|
"implementation"("ch.qos.logback:logback-classic:1.2.5")
|
2022-03-28 21:36:42 +07:00
|
|
|
"implementation"("com.github.ajalt.clikt:clikt:3.4.0")
|
2020-05-19 04:14:01 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
project(":android") {
|
|
|
|
apply(plugin = "com.android.application")
|
|
|
|
apply(plugin = "kotlin-android")
|
|
|
|
|
|
|
|
val natives by configurations.creating
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
"implementation"(project(":core"))
|
|
|
|
"implementation"("com.badlogicgames.gdx:gdx-backend-android:$gdxVersion")
|
2023-03-08 21:39:32 +07:00
|
|
|
"implementation"("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
|
2020-05-19 04:14:01 +07:00
|
|
|
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")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
project(":ios") {
|
|
|
|
apply(plugin = "kotlin")
|
|
|
|
apply(plugin = "robovm")
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
"implementation"(project(":core"))
|
|
|
|
"implementation"("com.mobidevelop.robovm:robovm-rt:$roboVMVersion")
|
|
|
|
"implementation"("com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion")
|
|
|
|
"implementation"("com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion")
|
|
|
|
"implementation"("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
project(":core") {
|
|
|
|
apply(plugin = "kotlin")
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
"implementation"("com.badlogicgames.gdx:gdx:$gdxVersion")
|
2023-03-08 21:39:32 +07:00
|
|
|
"implementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
|
2022-05-26 03:22:58 +07:00
|
|
|
"implementation"("org.jetbrains.kotlin:kotlin-reflect:${com.unciv.build.BuildConfig.kotlinVersion}")
|
2023-06-04 03:04:24 +07:00
|
|
|
|
2020-05-19 04:14:01 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Taken from https://github.com/TomGrill/gdx-testing
|
|
|
|
project(":tests") {
|
|
|
|
apply(plugin = "java")
|
|
|
|
apply(plugin = "kotlin")
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
"implementation"(project(":core"))
|
|
|
|
|
2023-03-08 21:39:32 +07:00
|
|
|
"implementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
|
2022-07-14 01:58:43 +07:00
|
|
|
|
2023-03-08 21:39:32 +07:00
|
|
|
"implementation"("junit:junit:4.13.2")
|
|
|
|
"implementation"("org.mockito:mockito-core:5.1.1")
|
2020-05-19 04:14:01 +07:00
|
|
|
|
2022-07-14 01:58:43 +07:00
|
|
|
"implementation"("com.badlogicgames.gdx:gdx-backend-lwjgl3:${gdxVersion}")
|
|
|
|
"implementation"("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop")
|
2020-05-19 04:14:01 +07:00
|
|
|
"implementation"("com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion")
|
|
|
|
"implementation"("com.badlogicgames.gdx:gdx:$gdxVersion")
|
|
|
|
|
2023-03-08 21:39:32 +07:00
|
|
|
"testImplementation"("junit:junit:4.13.2")
|
|
|
|
"testImplementation"("org.mockito:mockito-core:5.1.1")
|
2020-05-19 04:14:01 +07:00
|
|
|
"testImplementation"("io.mockk:mockk:1.9.3")
|
|
|
|
|
|
|
|
"testImplementation"("com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion")
|
|
|
|
"testImplementation"("com.badlogicgames.gdx:gdx:$gdxVersion")
|
|
|
|
"testImplementation"("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop")
|
|
|
|
}
|
|
|
|
}
|
2020-09-06 00:38:33 +07:00
|
|
|
}
|