-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
128 lines (102 loc) · 2.97 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import groovy.lang.Closure
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
alias(catalog.plugins.kotlin.jvm)
alias(catalog.plugins.kotlin.plugin.serialization)
alias(catalog.plugins.git.version)
alias(catalog.plugins.unmined)
}
val archive_name: String by rootProject.properties
val id: String by rootProject.properties
val name: String by rootProject.properties
val author: String by rootProject.properties
val description: String by rootProject.properties
val source: String by rootProject.properties
group = "settingdust.item_converter"
val gitVersion: Closure<String> by extra
version = gitVersion()
base {
archivesName = archive_name
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
repositories {
unimined.curseMaven()
unimined.modrinthMaven()
maven("https://thedarkcolour.github.io/KotlinForForge/") {
content { includeGroup("thedarkcolour") }
}
maven("https://maven.nucleoid.xyz/") {
content { includeGroup("xyz.nucleoid") }
}
}
unimined.minecraft {
version(catalog.versions.minecraft.get())
mappings {
searge()
mojmap()
parchment(mcVersion = "1.19.4", version = "2023.06.26")
devFallbackNamespace("searge")
}
minecraftForge {
mixinConfig("$id.mixins.json")
loader(catalog.versions.forge.get())
}
}
val modImplementation by configurations
val include by configurations
val minecraftLibraries by configurations
dependencies {
implementation(kotlin("stdlib-jdk8"))
compileOnly(catalog.mixin)
implementation(catalog.mixinextras.common)
implementation(catalog.kotlin.forge)
catalog.jgrapht.let {
minecraftLibraries(it)
implementation(it)
include(it)
minecraftLibraries("org.apfloat:apfloat:1.10.1")
minecraftLibraries("org.jheaps:jheaps:0.14")
include("org.apfloat:apfloat:1.10.1")
include("org.jheaps:jheaps:0.14")
}
}
kotlin {
jvmToolchain(17)
}
tasks {
withType<ProcessResources> {
val properties = mapOf(
"id" to id,
"version" to rootProject.version,
"group" to rootProject.group,
"name" to rootProject.name,
"description" to rootProject.property("description").toString(),
"source" to rootProject.property("source").toString()
)
from(rootProject.sourceSets.main.get().resources)
inputs.properties(properties)
filesMatching(
listOf(
"META-INF/mods.toml",
"*.mixins.json",
"META-INF/MANIFEST.MF"
)
) {
expand(properties)
}
}
withType<KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
}