Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle additional libraries with QKL #80

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,29 @@ fun DependencyHandlerScope.includeApi(dependency: Any) {
include(dependency)
}

fun DependencyHandlerScope.includeModApi(dependency: Provider<MinimalExternalModuleDependency>) {
include(dependency)
modApi(dependency) {
exclude(group = "net.fabricmc")
}
}

dependencies {
includeApi(project(":core", configuration = "namedElements"))
includeApi(project(":library", configuration = "namedElements"))

includeModApi(libs.serialization.minecraft)
includeApi(libs.collections.immutable)
includeApi(libs.klogging)
Comment on lines +64 to +66
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at how the project is structured, I think those additions would have to go either in the core or in the library subproject.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've read the project's README, and it seems like core is for the Kotlin adapter, and library is for FLK and other qkl specific things. So it made sense to us that each "sublibrary" in QKL should be declared in the root project. We could move that tho, not a problem.

}

allprojects {
apply(plugin=rootProject.libs.plugins.kotlin.get().pluginId)
apply(plugin=rootProject.libs.plugins.detekt.get().pluginId)
apply(plugin=rootProject.libs.plugins.licenser.get().pluginId)
apply(plugin=rootProject.libs.plugins.dokka.get().pluginId)
apply(plugin="maven-publish")
apply(plugin=rootProject.libs.plugins.quilt.loom.get().pluginId)
apply(plugin = rootProject.libs.plugins.kotlin.get().pluginId)
apply(plugin = rootProject.libs.plugins.detekt.get().pluginId)
apply(plugin = rootProject.libs.plugins.licenser.get().pluginId)
apply(plugin = rootProject.libs.plugins.dokka.get().pluginId)
apply(plugin = "maven-publish")
apply(plugin = rootProject.libs.plugins.quilt.loom.get().pluginId)

repositories {
mavenCentral()
Expand Down Expand Up @@ -307,17 +318,17 @@ tasks.curseforge.get().dependsOn(project(":core").tasks.remapJar)

modrinth {
token.set(System.getenv("MODRINTH_TOKEN"))

projectId.set("qkl")
versionName.set("QKL $rootVersion + FLK $flkVersion + Kotlin ${project.libs.versions.kotlin.orNull}")
versionType.set("release")

changelog.set(System.getenv("CHANGELOG") ?: "No changelog provided.")

file.set(tasks.remapJar.get().archiveFile)
additionalFiles.add(project(":core").tasks.remapJar.get().archiveFile)
dependencies {

dependencies {
required.project("qsl")
embedded.project("fabric-language-kotlin")
}
Expand Down
8 changes: 7 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
[versions]
atomic = "0.22.0"
binary_compat_plugin = "0.13.2"
collections_immutable = "0.3.5"
coroutines = "1.7.3"
datetime = "0.4.1"
dokka = "1.9.0"
klogging = "5.1.0"
kotlin = "1.9.10"
minecraft = "1.20.1"
qsl = "6.1.1+1.20.1"
quilt_loader = "0.20.2"
quilt_mappings = "1.20.1+build.23"
serialization = "1.6.0"
serialization_minecraft = "2.0.0+1.20.1"
serialization_plugin = "1.9.10" # usually same as kotlin but can lag behind
binary_compat_plugin = "0.13.2"

[libraries]
atomic = { module = "org.jetbrains.kotlinx:atomicfu-jvm", version.ref = "atomic" }
collections_immutable = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm", version.ref = "collections_immutable" }
coroutines_core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
coroutines_jdk8 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8", version.ref = "coroutines" }
coroutines_jvm = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm", version.ref = "coroutines" }
datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime-jvm", version.ref = "datetime" }
klogging = { module = "io.github.oshai:kotlin-logging-jvm", version.ref = "klogging" }
dokka_base = { module = "org.jetbrains.dokka:dokka-base", version.ref = "dokka" }
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
qsl = { module = "org.quiltmc:qsl", version.ref = "qsl" }
Expand All @@ -26,6 +31,7 @@ quilt_mappings = { module = "org.quiltmc:quilt-mappings", version.ref = "quilt_m
serialization_cbor = { module = "org.jetbrains.kotlinx:kotlinx-serialization-cbor-jvm", version.ref = "serialization" }
serialization_core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core-jvm", version.ref = "serialization" }
serialization_json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json-jvm", version.ref = "serialization" }
serialization_minecraft = { module = "io.github.natanfudge:kotlinx-serialization-minecraft", version.ref = "serialization_minecraft" }

[plugins]
detekt = { id = "io.gitlab.arturbosch.detekt", version = "1.23.1" }
Expand Down