This repository has been archived by the owner on Nov 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
93 lines (80 loc) · 2.63 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
plugins {
id("fabric-loom") version("0.5.22")
id("com.matthewprenger.cursegradle") version("1.1.0")
id("maven")
}
apply from: 'https://files.latmod.com/public/markdown-git-changelog.gradle'
def ENV = System.getenv()
version = project.mod_version
group = project.mod_package
archivesBaseName = project.mod_name
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaVersion.VERSION_1_8
minecraft {
accessWidener "src/main/resources/kubejs.accessWidener"
}
repositories {
maven { url "https://mod-buildcraft.com/maven" }
maven { url "https://www.cursemaven.com" }
}
dependencies {
minecraft("com.mojang:minecraft:${project.minecraft_version}")
mappings(minecraft.officialMojangMappings())
modApi("net.fabricmc:fabric-loader:${project.fabric_version}")
modApi("net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}")
modApi("curse.maven:rhino:${project.rhino_file}")
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
modCompileOnly("me.shedaniel:RoughlyEnoughItems-api:5.8.1")
modRuntime("me.shedaniel:RoughlyEnoughItems:5.8.1")
}
processResources {
inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
expand "version": project.version
}
from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}
if (ENV.LOCAL_MAVEN) {
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://${ENV.LOCAL_MAVEN}")
}
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier("sources")
from sourceSets.main.allSource
}
if (ENV.CURSEFORGE_KEY) {
curseforge {
apiKey = ENV.CURSEFORGE_KEY
project {
id = "${curseforge_id}"
releaseType = "release"
addGameVersion "1.16.1"
addGameVersion "1.16.2"
addGameVersion "1.16.3"
addGameVersion "Fabric"
relations {
requiredDependency "fabric-api"
}
changelog = getGitChangelog
changelogType = 'markdown'
mainArtifact(file("${project.buildDir}/libs/${project.archivesBaseName}-${project.version}.jar"))
addArtifact(file("${project.buildDir}/libs/${project.archivesBaseName}-${project.version}-sources.jar"))
afterEvaluate {
uploadTask.dependsOn("remapJar")
}
}
}
options {
forgeGradleIntegration = false
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}