forked from gbl/ClickThrough
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
115 lines (95 loc) · 3.04 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
buildscript {
dependencies {
classpath 'de.guntram.mcmod:crowdin-translate:1.2'
}
repositories {
maven {
name = 'CrowdinTranslate source'
url = "https://minecraft.guntram.de/maven/"
}
}
}
plugins {
id 'fabric-loom' version '0.5-SNAPSHOT'
id "com.modrinth.minotaur" version "1.1.0"
id "com.matthewprenger.cursegradle" version "1.4.0"
}
apply plugin: 'de.guntram.mcmod.crowdin-translate'
crowdintranslate.crowdinProjectName = 'clickthrough'
repositories {
maven {
url = "https://maven.fabricmc.net"
}
maven {
url = "https://minecraft.guntram.de/maven/"
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext.Versions = new Properties()
Versions.load(file("Versionfiles/mcversion-1.16.5.properties").newReader())
archivesBaseName = "clickthrough"
ext.projectVersion = "0.4"
version = "${Versions['minecraft_version']}-fabric${Versions['fabric_versiononly']}-${project.projectVersion}"
minecraft {
refmapName = "clickthrough-refmap.json";
}
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"
}
}
dependencies {
minecraft "com.mojang:minecraft:${Versions['minecraft_version']}"
mappings "net.fabricmc:yarn:${Versions['yarn_mappings']}:v2"
modImplementation "net.fabricmc:fabric-loader:${Versions['loader_version']}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${Versions['fabric_version']}"
modImplementation "io.github.prospector:modmenu:${Versions['modmenu_version']}"
modImplementation "de.guntram.mcmod:GBfabrictools:${Versions['gbfabrictools_version']}"
include "de.guntram.mcmod:GBfabrictools:${Versions['gbfabrictools_version']}"
modImplementation "de.guntram.mcmod:crowdin-translate:1.2"
include "de.guntram.mcmod:crowdin-translate:1.2"
}
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
jar {
from "LICENSE"
}
build {
dependsOn downloadTranslations
}
import com.modrinth.minotaur.TaskModrinthUpload
task publishModrinth (type: TaskModrinthUpload){
token = System.getenv("MODRINTH_TOKEN")
projectId = 'Z5b0cAlD'
versionNumber = project.version
versionName = project.archivesBaseName
releaseType = 'release'
uploadFile = remapJar // This is the java jar task
addGameVersion("${Versions['minecraft_version']}")
addLoader('fabric')
}
curseforge {
apiKey = System.getenv("CURSEFORGE_TOKEN")
project {
id = '405262'
releaseType = 'release'
addGameVersion("${Versions['minecraft_version']}")
addGameVersion("Java 8")
addGameVersion("Fabric")
mainArtifact(remapJar)
}
options {
forgeGradleIntegration = false
}
}