-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (87 loc) · 2.75 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
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
plugins {
id 'eclipse'
id 'idea'
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false
id "maven-publish"
}
architectury {
minecraft = rootProject.minecraft_version
}
group = maven_group
if(project.properties['commit_hash'] != null) {
version = "${mod_version}-commit.${project.properties['commit_hash']}+mc${minecraft_version}"
} else {
version = "${mod_version}+mc${minecraft_version}"
}
subprojects {
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.codehaus.groovy:groovy-json:3.0.9")
}
}
apply plugin: "dev.architectury.loom"
apply plugin: "maven-publish"
configurations {
mixinDependency
}
loom {
silentMojangMappingsLicense()
}
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings loom.officialMojangMappings()
mixinDependency("net.fabricmc:sponge-mixin:0.12.5+mixin.0.8.5") { transitive = false }
}
processResources {
doLast {
fileTree(dir: outputs.files.asPath, include: "**/*.json").each {
File file -> file.text = JsonOutput.toJson(new JsonSlurper().parse(file))
}
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/der-fruhling-entertainment/create-train-perspective")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
}
}
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
base {
archivesName = rootProject.archives_base_name
}
version = rootProject.version
group = rootProject.group
repositories {
maven { url = 'https://maven.tterrag.com/' }
maven { url = "https://mvn.devos.one/snapshots/" }
maven { url = "https://mvn.devos.one/releases/" }
maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" }
maven { url = "https://maven.jamieswhiteshirt.com/libs-release" }
maven { url = "https://jitpack.io/" }
maven { url "https://maven.shedaniel.me/" }
maven { url "https://maven.terraformersmc.com/releases/" }
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.release = 17
}
java {
withSourcesJar()
}
}