-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
81 lines (69 loc) · 1.97 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
81 lines (69 loc) · 1.97 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
81
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
idea
`kotlin-dsl`
`maven-publish`
}
group = "dev.hytalemods"
version = providers.environmentVariable("PLUGIN_VERSION").orNull ?: "0.0.0-development"
// Kotlin does not support building with Java 25 yet.
val javaVersion = 25
val javaTarget = JvmTarget.JVM_25
val pluginId: String by project
val pluginDisplayName: String by project
val pluginMainClass: String by project
val pluginVcsUrl: String by project
val pluginWebsite: String by project
repositories {
gradlePluginPortal()
mavenCentral()
}
dependencies {
compileOnly(gradleApi())
compileOnly(gradleKotlinDsl())
implementation("net.harawata:appdirs:1.5.0")
implementation("org.jetbrains.gradle.plugin.idea-ext:org.jetbrains.gradle.plugin.idea-ext.gradle.plugin:1.4.1")
}
kotlin {
jvmToolchain {
languageVersion = JavaLanguageVersion.of(javaVersion)
}
compilerOptions {
freeCompilerArgs = listOf(
"-Werror",
"-java-parameters",
"-Xsam-conversions=class",
"-Xjsr305=strict",
"-Xjspecify-annotations=strict"
)
allWarningsAsErrors = true
jvmTarget = javaTarget
}
}
idea.module {
isDownloadSources = true
isDownloadJavadoc = true
}
gradlePlugin {
plugins {
create("hytale-mod", closureOf<PluginDeclaration> {
id = pluginId
displayName = pluginDisplayName
implementationClass = pluginMainClass
vcsUrl = pluginVcsUrl
website = pluginWebsite
// TODO description, tags
})
}
}
publishing {
repositories {
maven("https://maven.hytale-mods.dev/releases") {
name = "HytaleModdingReleases"
credentials {
username = providers.environmentVariable("HM_RELEASES_MAVEN_USER").orNull
password = providers.environmentVariable("HM_RELEASES_MAVEN_TOKEN").orNull
}
}
}
}