-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
179 lines (161 loc) · 5.17 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
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"
)
}
}
plugins {
id "maven-publish"
id "java-library"
id 'maven'
}
apply(plugin: "org.jetbrains.dokka")
apply(plugin: "net.minecraftforge.gradle")
apply(plugin: "kotlin")
apply(plugin: "kotlinx-serialization")
String packagesToken = new String(package_public_token.decodeBase64())
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 {
ProjectEssentialsCooldown {
//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 {
ProjectEssentialsCooldown {
//noinspection GroovyAssignabilityCheck
source(sourceSets.main)
}
}
}
}
}
repositories {
jcenter()
mavenCentral()
maven { url("https://libraries.minecraft.net") }
maven { url("https://jitpack.io") }
maven {
name = "GitHubPackages"
url = uri "https://maven.pkg.github.com/projectessentials/projectessentials-core"
credentials {
username = "MairwunNx@gmail.com"
password = packagesToken
}
}
maven {
name = "GitHubPackages"
url = uri "https://maven.pkg.github.com/projectessentials/projectessentials-permissions"
credentials {
username = "MairwunNx@gmail.com"
password = packagesToken
}
}
}
dependencies {
implementation 'com.mairwunnx.project_essentials_core:ProjectEssentials-Core:1.14.4-1.3.0'
implementation 'com.mairwunnx.project_essentials_permissions:ProjectEssentials-Permissions:1.14.4-1.2.1'
minecraft(group: "net.minecraftforge", name: "forge", version: forge_version)
implementation(group: "com.mojang", name: "brigadier", version: brigadier_version)
implementation(
group: "org.jetbrains.kotlinx",
name: "kotlinx-serialization-runtime",
version: kotlinx_serialization_version
)
implementation(
group: "org.jetbrains.kotlin",
name: "kotlin-stdlib-$kotlin_jdk_version_target",
version: kotlin_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
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
task dokkaJar(type: Jar) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles Kotlin docs with Dokka"
classifier = "javadoc"
from tasks.dokka as Object
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri "https://maven.pkg.github.com/projectessentials/projectessentials-cooldown"
credentials {
username = System.getenv("GradleUser")
password = System.getenv("GradlePass")
}
}
}
publications {
gpr(MavenPublication) {
from components.java
artifact sourcesJar
artifact dokkaJar
}
}
}