Repository navigation
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
154 lines (133 loc) · 3.95 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
154 lines (133 loc) · 3.95 KB
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import org.gradle.plugins.ide.idea.model.IdeaModel
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.kotlin.jvm) apply false
id("net.fabricmc.fabric-loom") apply false
id("net.fabricmc.fabric-loom-remap") apply false
id("net.neoforged.moddev") apply false
id("net.neoforged.moddev.legacyforge") apply false
}
tasks.named<Wrapper>("wrapper").configure {
distributionType = Wrapper.DistributionType.BIN
}
with(System.getProperties()) {
val version = get("java.version")
val vmVersion = get("java.vm.version")
val vendor = get("java.vendor")
val arch = get("os.arch")
println("Configuring with Java: $version, JVM: $vmVersion ($vendor), Arch: $arch")
}
subprojects {
val modVersion: String by project
val modGroupId: String by project
version = modVersion
group = modGroupId
tasks.withType<AbstractArchiveTask>().configureEach {
archiveVersion.set("v$modVersion")
}
repositories {
// flatDir {
// dir("libs")
// }
exclusiveContent {
forRepository {
maven {
url = uri("https://cursemaven.com")
}
}
filter {
includeGroup("curse.maven")
}
}
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = uri("https://api.modrinth.com/maven")
}
}
filter {
includeGroup("maven.modrinth")
}
}
maven {
name = "ParchmentMC"
url = uri("https://maven.parchmentmc.org")
}
// appeng
maven {
name = "ModMaven"
url = uri("https://modmaven.dev/")
}
maven {
name = "Kotlin for Forge"
url = uri("https://thedarkcolour.github.io/KotlinForForge/")
}
maven {
name = "Architectury"
url = uri("https://maven.architectury.dev/")
content {
includeGroup("dev.architectury")
}
}
maven {
name = "covers1624"
url = uri("https://maven.covers1624.net/")
content {
includeGroup("com.brandon3055.brandonscore")
includeGroup("io.codechicken")
}
}
maven {
name = "JitPack"
url = uri("https://jitpack.io")
content {
includeGroup("com.github.rtyley")
}
}
maven {
name = "Curse Maven"
url = uri("https://cursemaven.com")
content {
includeGroup("curse.maven")
}
}
maven {
name = "Latvian"
url = uri("https://maven.latvian.dev/releases")
content {
includeGroup ("dev.latvian.mods")
includeGroup ("dev.latvian.apps")
}
}
}
tasks.withType<JavaCompile>().configureEach {
doFirst {
with(javaCompiler.get().metadata) {
println("Compiling with Java: $javaRuntimeVersion, JVM: $jvmVersion ($vendor)")
}
}
options.encoding = "UTF-8"
}
tasks.withType<KotlinCompile>().configureEach {
val kotlinJvmTarget = project.findProperty("javaVersion")?.toString() ?: "17"
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(kotlinJvmTarget))
freeCompilerArgs.add("-Xjvm-default=all")
}
}
afterEvaluate {
tasks.withType<JavaExec>().configureEach {
standardInput = System.`in`
}
}
plugins.withId("idea") {
configure<IdeaModel> {
module {
isDownloadSources = true
isDownloadJavadoc = true
}
}
}
}