-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
70 lines (61 loc) · 2.27 KB
/
build.gradle.kts
File metadata and controls
70 lines (61 loc) · 2.27 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
import club.asynclab.asyncauth.Props
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.plugins.ide.idea.model.IdeaModel
import org.jetbrains.kotlin.gradle.plugin.KaptExtension
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
import java.util.*
plugins {
id("org.jetbrains.gradle.plugin.idea-ext")
kotlin("plugin.serialization") version "1.9.23" apply false
kotlin("plugin.lombok") version "1.9.23" apply false
}
subprojects {
listOf(
"java",
"eclipse",
"idea",
"maven-publish",
"java-library",
"com.gradleup.shadow",
"org.jetbrains.gradle.plugin.idea-ext",
"org.jetbrains.kotlin.jvm",
"org.jetbrains.kotlin.kapt",
"org.jetbrains.kotlin.plugin.serialization",
"org.jetbrains.kotlin.plugin.lombok"
).forEach(plugins::apply)
repositories {
maven("https://maven.aliyun.com/repository/public/")
maven("https://jitpack.io")
maven("https://thedarkcolour.github.io/KotlinForForge/")
maven("https://modmaven.dev")
maven("https://www.cursemaven.com") { content { includeGroup("curse.maven") } }
mavenLocal()
mavenCentral()
}
tasks.withType<Jar>().configureEach {
manifest {
attributes(
mapOf(
"Specification-Title" to Props.MOD_ID,
"Specification-Vendor" to Props.MOD_AUTHORS,
"Specification-Version" to "1", // We are version 1 of ourselves
"Implementation-Title" to Props.MOD_NAME,
"Implementation-Version" to Props.MOD_VERSION,
"Implementation-Vendor" to Props.MOD_AUTHORS,
"Implementation-Timestamp" to DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ")
.format(Date().toInstant().atOffset(ZoneOffset.UTC))
)
)
}
}
configure<IdeaModel> {
module.isDownloadJavadoc = true
module.isDownloadSources = true
}
configure<KaptExtension> { keepJavacAnnotationProcessors = true }
tasks.withType<JavaCompile>().configureEach { options.encoding = "UTF-8" }
tasks.withType<ShadowJar> {
// relocateToShadowPath
}
}