-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
84 lines (71 loc) · 2.35 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
import java.net.URL
import java.util.Properties
plugins {
java
`kotlin-dsl`
id("com.gradle.plugin-publish") version "0.12.0"
`java-gradle-plugin`
}
repositories {
gradlePluginPortal()
jcenter()
maven {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
maven {
name = "Gunpowder"
url = uri("https://maven.martmists.com/releases")
}
}
val pr = URL("https://raw.githubusercontent.com/Gunpowder-MC/Gunpowder/master/gradle.properties").openConnection().getInputStream()
val props = Properties()
props.load(pr)
props.forEach { prop ->
project.ext.set(prop.key as String, prop.value)
}
dependencies {
/* Depend on the kotlin plugin, since we want to access it in our plugin */
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${props["kotlin"]}")
implementation("gradle.plugin.org.cadixdev.gradle:licenser:${props["licenser"]}")
implementation("net.fabricmc:fabric-loom:${props["fabric_loom"]}")
implementation("gradle.plugin.com.github.johnrengelman:shadow:${props["shadow"]}")
implementation("gradle.plugin.com.matthewprenger:CurseGradle:${props["cursegradle"]}")
implementation("com.github.ben-manes:gradle-versions-plugin:${props["updater"]}")
/* Depend on the default Gradle API's since we want to build a custom plugin */
implementation(gradleApi())
implementation(localGroovy())
}
tasks.withType<Javadoc> {
enabled = false
}
tasks.withType<Groovydoc> {
enabled = false
}
gradlePlugin {
plugins {
create("main") {
id = "io.github.gunpowder"
implementationClass = "io.github.gunpowder.GunpowderPlugin"
}
}
}
tasks.withType<ProcessResources> {
duplicatesStrategy = DuplicatesStrategy.WARN
}
pluginBundle {
website = "https://github.com/gunpowder-mc/"
vcsUrl = "https://github.com/gunpowder-mc/GunpowderPlugin"
description = "GunpowderPlugin imports and configures the required dependencies to develop for Gunpowder."
(plugins) {
"main" {
// id is captured from java-gradle-plugin configuration
displayName = "Gunpowder Development Plugin"
tags = listOf("fabric", "mc", "minecraft", "server", "plugin", "gunpowder")
}
}
mavenCoordinates {
groupId = "io.github.gunpowder"
artifactId = "gunpowder-plugins"
}
}