-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
138 lines (125 loc) · 4.08 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
buildscript {
repositories {
maven { url("https://files.minecraftforge.net/maven") }
maven { url("https://libraries.minecraft.net") }
maven { url("https://plugins.gradle.org/m2/") }
jcenter()
mavenCentral()
}
dependencies {
classpath(
group: "net.minecraftforge.gradle",
name: "ForgeGradle",
version: forge_gradle_version,
changing: true
)
classpath(
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
)
classpath(
"org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
)
classpath(
"org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
)
}
}
apply(plugin: "org.jetbrains.dokka")
apply(plugin: "net.minecraftforge.gradle")
apply(plugin: "kotlin")
apply(plugin: "kotlinx-serialization")
version = module_version
group = "com.mairwunnx.$module_id"
archivesBaseName = module_name
minecraft {
mappings(
channel: forge_mappings_channel_type,
version: forge_mappings_channel_version
)
runs {
client {
//noinspection GroovyAssignabilityCheck
workingDirectory(project.file(dev_run_client_path))
property("forge.logging.markers", "SCAN,REGISTRIES,REGISTRYDUMP")
property("forge.logging.console.level", "debug")
mods {
ProjectEssentialsPermissions {
//noinspection GroovyAssignabilityCheck
source(sourceSets.main)
}
}
}
server {
//noinspection GroovyAssignabilityCheck
workingDirectory(project.file(dev_run_server_path))
property("forge.logging.markers", "SCAN,REGISTRIES,REGISTRYDUMP")
property("forge.logging.console.level", "debug")
mods {
ProjectEssentialsPermissions {
//noinspection GroovyAssignabilityCheck
source(sourceSets.main)
}
}
}
}
}
repositories {
jcenter()
mavenCentral()
maven { url("https://minecraft.curseforge.com/api/maven/") }
maven { url("https://libraries.minecraft.net") }
maven { url("https://jitpack.io") }
}
dependencies {
minecraft(group: "net.minecraftforge", name: "forge", version: forge_version)
compile(group: "com.mojang", name: "brigadier", version: brigadier_version)
compile(
group: "org.jetbrains.kotlinx",
name: "kotlinx-serialization-runtime",
version: kotlinx_serialization_version
)
compile(
group: "org.jetbrains.kotlin",
name: "kotlin-stdlib-$kotlin_jdk_version_target",
version: kotlin_version
)
compile(
group: "com.github.projectessentials",
name: "ProjectEssentials-Core",
version: ess_core_version
)
compile(
group: "com.github.projectessentials",
name: "ProjectEssentials-Cooldown",
version: ess_cooldown_version
)
}
dokka {
outputFormat = 'html'
outputDirectory = "$buildDir/libs/docs"
}
project.tasks["jar"].dependsOn(project.tasks["dokka"])
jar {
manifest {
attributes([
"Specification-Title" : module_name,
"Specification-Vendor" : module_vendor,
"Specification-Version" : module_version,
"Implementation-Title" : module_name,
"Implementation-Version" : module_version,
"Implementation-Vendor" : module_vendor,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
sourceCompatibility = targetCompatibility =
compileJava.sourceCompatibility =
compileJava.targetCompatibility = project_jvm_version_target
compileKotlin.kotlinOptions.jvmTarget =
compileTestKotlin.kotlinOptions.jvmTarget = project_jvm_version_target
//noinspection GroovyAssignabilityCheck
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs += "-Xuse-experimental=kotlin.Experimental"
}
}