-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
49 lines (43 loc) · 1.46 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
plugins {
`kotlin-dsl`
`maven-publish`
kotlin("plugin.serialization") version "1.9.22"
}
group = "com.github.minecraftschurlimods"
version = "1.15"
base.archivesName = "HelperPlugin"
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
repositories {
mavenCentral()
gradlePluginPortal()
maven { url = uri("https://maven.neoforged.net/releases") }
}
dependencies {
implementation("com.akuleshov7:ktoml-core:0.5.1")
implementation("net.neoforged.gradle:userdev:[7.0.167,)")
}
gradlePlugin {
plugins {
create("helper") {
id = "com.github.minecraftschurlimods.helperplugin"
displayName = "Helper Plugin"
description = "A gradle helper plugin built on-top of the neoforged/NeoGradle plugin"
implementationClass = "com.github.minecraftschurlimods.helperplugin.HelperPlugin"
}
}
}
publishing.repositories.maven {
val mavenUrl = project.providers.environmentVariable("MAVEN_URL").map { uri(it) }
val mavenUser = project.providers.environmentVariable("MAVEN_USER")
val mavenPassword = project.providers.environmentVariable("MAVEN_PASSWORD")
if (mavenUrl.isPresent && mavenUser.isPresent && mavenPassword.isPresent) {
url = mavenUrl.get()
credentials {
username = mavenUser.get()
password = mavenPassword.get()
}
} else {
println("Using repo folder")
url = uri(layout.buildDirectory.dir("repo"))
}
}