-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
122 lines (103 loc) · 3.78 KB
/
build.gradle
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
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20'
}
}
plugins {
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7"
}
configurations.all {
// Check for snapshots more frequently than Gradle's default of 1 day. 0 = every build.
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
subprojects {
apply plugin: 'java'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'kotlin'
sourceSets {
main.kotlin.srcDirs = ['src/main/java', 'src/main/kotlin']
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
java.withSourcesJar()
jar {
dependsOn 'processDocs'
duplicatesStrategy = DuplicatesStrategy.INCLUDE
manifest {
attributes([
"Specification-Title" : project.name,
"Specification-Vendor" : project.group_id,
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Vendor" : project.group_id,
"Implementation-URL" : "http://journeymap.info",
"Implementation-Timestamp": getDate()
])
}
}
repositories {
mavenCentral()
maven {
name = 'Sponge / Mixin'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
maven {
name = "JourneyMap (Public)"
url = "https://jm.gserv.me/repository/maven-public/"
}
maven {
url "https://www.cursemaven.com"
}
maven {
name = 'BlameJared Maven (CrT / Bookshelf)'
url = 'https://maven.blamejared.com'
}
// used for local mods in the libs folder
flatDir {
dirs '../libs'
}
}
dependencies {
implementation group: 'info.journeymap', name: 'webmap-client', version: project.journeymap_webmap_version, changing: true
compileOnly "curse.maven:journeymap-32274:${project.journeymap_forge_version}"
// implementation "ignored:journeymap-forge:1.21.1-6.0.0-beta.27"
// for annotations
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
// external libs
implementation group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: '1.9.20'
implementation group: 'io.javalin', name: 'javalin', version: '6.1.6'
testImplementation "curse.maven:journeymap-32274:${project.journeymap_forge_version}"
// testImplementation "ignored:journeymap-forge:1.21.1-6.0.0-beta.27"
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.release = 21
}
compileKotlin {
source(project(":Common").sourceSets.main.allSource)
inputs.file "../gradle.properties"
kotlinOptions {
jvmTarget = "21"
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}
}
// Disables Gradle's custom module metadata from being published to maven. The
// metadata includes mapped dependencies which are not reasonably consumable by
// other mod developers.
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
}
def getDate() {
def date = new Date()
def formattedDate = date.format(project.dateFormat)
return formattedDate
}