-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
102 lines (85 loc) · 2.34 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
//file:noinspection all
plugins {
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'maven-publish'
id "org.jetbrains.kotlin.jvm" version "1.9.+"
}
def ENV = System.getenv()
version = mod_version
group = maven_group
repositories {
maven {
name = "Andante's Maven"
url = "https://maven.andante.dev/releases/"
}
}
dependencies {
minecraft "com.mojang:minecraft:$minecraft_version"
mappings "net.fabricmc:yarn:$minecraft_version+build.$yarn_build:v2"
modImplementation "net.fabricmc:fabric-loader:$loader_version"
modImplementation "net.fabricmc.fabric-api:fabric-api:$fabric_version"
modImplementation "net.fabricmc:fabric-language-kotlin:$fabric_kotlin_version"
include modImplementation ("com.github.yundom:kache:$kache_version")
include modImplementation ("net.mcbrawls.inject:api:$inject_version")
include modImplementation ("net.mcbrawls.inject:fabric:$inject_version")
}
sourceSets {
test {
compileClasspath += main.compileClasspath
runtimeClasspath += main.runtimeClasspath
}
}
loom {
runs {
testServer {
server()
name = "Minecraft Server (Test)"
source sourceSets.test
}
}
}
processResources {
inputs.property "version", version
filesMatching("fabric.mod.json") {
expand "version": version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 21
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = 21
}
}
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jar {
from("LICENSE") {
rename { "${it}_$archivesBaseName"}
}
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
// Andante's Maven
def mavenUsername = ENV["MAVEN_USERNAME_ANDANTE"]
def mavenPassword = ENV["MAVEN_PASSWORD_ANDANTE"]
if (mavenUsername && mavenPassword) {
maven {
name = "Andante"
url = "https://maven.andante.dev/releases/"
credentials.username = mavenUsername
credentials.password = mavenPassword
}
}
}
}