-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
106 lines (93 loc) · 3.15 KB
/
build.gradle.kts
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
@file:Suppress("UnstableApiUsage")
plugins {
`java-gradle-plugin`
`maven-publish`
id("org.jetbrains.kotlin.jvm") version ("1.3.72")
}
val release: String by project
gradlePlugin {
plugins {
create("remapperPlugin") {
id = "intermediary2srg"
implementationClass = "com.minelittlepony.intermediary2srg.Intermediary2SrgPlugin"
}
}
}
repositories {
jcenter()
mavenCentral()
maven("https://maven.fabricmc.net") {
name = "fabricmc"
}
}
dependencies {
implementation("net.fabricmc:fabric-loom:0.4-SNAPSHOT")
implementation("net.fabricmc:tiny-remapper:0.3.1.71")
implementation("net.fabricmc:tiny-mappings-parser:0.3.0+build.17")
implementation("com.google.code.gson:gson:2.8.5")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.cadixdev:mercury:0.1.0.fabric-SNAPSHOT")
implementation("org.zeroturnaround:zt-zip:1.13")
implementation("net.fabricmc:stitch:0.4.6+")
implementation("net.fabricmc:lorenz-tiny:2.0.0+build.2")
testImplementation(gradleTestKit())
testImplementation("junit:junit:4.13")
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
}
}
tasks {
named<Jar>("jar") {
from("LICENSE")
}
register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
from("LICENSE")
}
}
artifacts {
archives(tasks["sourcesJar"])
}
publishing {
publications {
// java-gradle-plugin creates a maven publication automatically
create<MavenPublication>("pluginMaven") {
artifact(tasks["sourcesJar"])
pom {
name.set("intermediary2srg")
description.set("Translates intermediary mods to searge names")
url.set("https://github.com/MineLittlePony/intermediary2srg")
licenses {
license {
name.set("MIT Public License")
url.set("https://tlo.mit.edu/learn-about-intellectual-property/software-and-open-source-licensing")
}
}
scm {
connection.set("scm:git:git://github.com/MineLittlePony/intermediary2srg.git")
developerConnection.set("scm:git:ssh://github.com/MineLittlePony/intermediary2srg.git")
url.set("https://github.com/MineLittlePony/intermediary2srg")
}
}
}
}
repositories {
mavenLocal()
val s3AccessKey: String? = System.getenv("ACCESS_KEY")
val s3SecretKey: String? = System.getenv("SECRET_KEY")
if (s3AccessKey != null && s3SecretKey != null) {
maven {
name = "MineLittlePony"
url = uri("s3://repo.minelittlepony-mod.com/maven/" +
if (release == "SNAPSHOT") "snapshot" else "release")
credentials(AwsCredentials::class.java) {
this.accessKey = s3AccessKey
this.secretKey = s3SecretKey
}
}
}
}
}