-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
80 lines (65 loc) · 1.82 KB
/
build.gradle.kts
File metadata and controls
80 lines (65 loc) · 1.82 KB
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
plugins {
id("java")
id("maven-publish")
id("org.taumc.gradle.versioning")
id("org.taumc.gradle.publishing")
}
group = "org.taumc"
project.version = tau.versioning.version(rootProject.properties["project_version"].toString(), rootProject.properties["release_channel"])
repositories {
mavenCentral()
}
java {
withSourcesJar()
}
dependencies {
val asmVersion = "9.8"
compileOnly("org.ow2.asm:asm:${asmVersion}")
compileOnly("org.ow2.asm:asm-tree:${asmVersion}")
compileOnly("org.ow2.asm:asm-commons:${asmVersion}")
compileOnly("org.apache.commons:commons-compress:1.26.2")
compileOnly("commons-io:commons-io:2.11.0")
compileOnly("org.jetbrains:annotations:26.0.2")
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
tasks.test {
useJUnitPlatform()
}
tasks.jar {
manifest {
attributes.put("Premain-Class", "org.taumc.fmljavafix.Agent")
}
}
publishing {
repositories {
maven {
name = "taumcRepository"
url = uri("https://maven.taumc.org/releases")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_SECRET")
}
}
}
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
}
val tauGradlePublish = tau.publishing.publish {
dependsOn(tasks.jar)
useTauGradleVersioning()
changelog = tau.versioning.commitChangeLog
github("GitHub") {
supportAllChannels()
uploadArtifacts = false
accessToken = System.getenv("GITHUB_TOKEN")
repository = "TauMC/fml-java-fix-agent"
tagName = tau.versioning.releaseTag
}
}
tasks.publish {
dependsOn(tauGradlePublish)
}