forked from Wybxc/IngameIME-Minecraft
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle.kts
62 lines (49 loc) · 1.72 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
plugins {
java
id("architectury-plugin") version "3.4-SNAPSHOT"
id("dev.architectury.loom") version "1.4-SNAPSHOT" apply false
id("me.shedaniel.unified-publishing") version "0.1.+" apply false
kotlin("jvm") version "1.9.22" apply false
}
architectury {
minecraft = rootProject.property("minecraft_version").toString()
}
subprojects {
apply(plugin = "dev.architectury.loom")
apply(plugin = "me.shedaniel.unified-publishing")
val loom = project.extensions.getByName<net.fabricmc.loom.api.LoomGradleExtensionAPI>("loom")
loom.silentMojangMappingsLicense()
dependencies {
"minecraft"("com.mojang:minecraft:${project.property("minecraft_version")}")
"mappings"(loom.officialMojangMappings())
}
}
allprojects {
apply(plugin = "java")
apply(plugin = "architectury-plugin")
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.kotlin.jvm")
base.archivesName.set(rootProject.property("archives_base_name").toString())
version = "${rootProject.property("mod_version")}-${project.property("minecraft_version")}"
group = rootProject.property("maven_group").toString()
repositories {
}
dependencies {
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:${property("kotlin_version")}")
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(17)
}
java {
withSourcesJar()
}
val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "17"
}
val compileTestKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "17"
}
}