forked from architectury/architectury-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
33 lines (29 loc) · 1.24 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
plugins {
id "org.jetbrains.kotlin.jvm" version "1.8.10"
id "org.jetbrains.kotlin.plugin.serialization" version "1.8.10"
}
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0"
implementation "org.kohsuke:github-api:1.135"
implementation "org.dom4j:dom4j:2.1.3"
}
task run(type: JavaExec, dependsOn: jar) {
mainClass = "dev.architectury.templates.GenerateTemplatesKt"
environment "CONFIG_PATH", file("generator.config.json").absolutePath
environment "OUTPUT_PATH", file("build/templates").absolutePath
environment "BODY_PATH", file("body.md").absolutePath
environment "PUBLISH", "true"
environment "GITHUB_TOKEN", System.getenv("GITHUB_TOKEN")
environment "GITHUB_REPOSITORY", System.getenv("GITHUB_REPOSITORY")
classpath configurations.runtimeClasspath.files + jar.archiveFile
}
task runLocal(type: JavaExec, dependsOn: jar) {
mainClass = "dev.architectury.templates.GenerateTemplatesKt"
environment "CONFIG_PATH", file("generator.config.json").absolutePath
environment "OUTPUT_PATH", file("build/templates").absolutePath
environment "PUBLISH", "false"
classpath configurations.runtimeClasspath.files + jar.archiveFile
}