Skip to content

Commit a23ff49

Browse files
committed
update to dev gradle 1.2
1 parent 99069ec commit a23ff49

2 files changed

Lines changed: 12 additions & 21 deletions

File tree

‎build.gradle.kts‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("zenithproxy.plugin.dev") version "1.1.+"
2+
id("zenithproxy.plugin.dev") version "1.2.+"
33
}
44

55
group = property("maven_group") as String
@@ -10,13 +10,17 @@ val pluginId = property("plugin_id") as String
1010
java { toolchain { languageVersion = JavaLanguageVersion.of(25) } }
1111

1212
zenithProxyPlugin {
13-
templateProperties = mapOf(
14-
// variables in your BuildConstants.java template class
15-
"version" to project.version,
16-
"mc_version" to mc,
17-
"plugin_id" to pluginId,
18-
"maven_group" to group as String,
19-
)
13+
// Generates a BuildConstants.java file to the project's group java package
14+
// Allows you to pass in data from gradle into the plugin's classes
15+
buildConstants {
16+
// map of Java field name to String value
17+
fields = mapOf(
18+
"VERSION" to project.version.toString(),
19+
"MC_VERSION" to mc,
20+
"PLUGIN_ID" to pluginId,
21+
"MAVEN_GROUP" to project.group.toString(),
22+
)
23+
}
2024
// the minimum supported java version for users of your plugin
2125
javaReleaseVersion = JavaLanguageVersion.of(21)
2226
// set to false if developing against a zenith version before 3.7.0

‎src/main/templates/org/example/BuildConstants.java‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)