Skip to content

Commit a9d36d7

Browse files
committed
configure versions
1 parent f6ab755 commit a9d36d7

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

build.gradle.kts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import java.net.URI
44
plugins {
55
java
66
`plugin-perms-for-ngt-build`
7+
id("com.anatawa12.compile-time-constant") version "1.0.5"
78
}
89

9-
group = "org.example"
10-
version = "1.0-SNAPSHOT"
10+
group = "com.anatawa12.plugin-permissions-for-ngt"
11+
version = property("version").toString()
1112

1213
val api by sourceSets.creating
1314

@@ -26,6 +27,10 @@ tasks.jar {
2627
manifest.attributes("FMLCorePluginContainsFMLMod" to "*")
2728
}
2829

30+
tasks.createCompileTimeConstant {
31+
constantsClass = "com.anatawa12.pluginPermsForNgt.Constants"
32+
values(mapOf("VERSION" to version.toString()))
33+
}
2934

3035
val fixRTMId = 365235
3136
val rtmId = 288988

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=1.0-SNAPSHOT

src/main/java/com/anatawa12/pluginPermsForNgt/PluginPermsForNgtMain.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66

77
import static com.anatawa12.pluginPermsForNgt.PluginPermsForNgtMain.MODID;
88
import static com.anatawa12.pluginPermsForNgt.PluginPermsForNgtMain.NAME;
9+
import static com.anatawa12.pluginPermsForNgt.PluginPermsForNgtMain.VERSION;
910

10-
@net.minecraftforge.fml.common.Mod(modid = MODID, name = NAME)
11-
@cpw.mods.fml.common.Mod(modid = MODID, name = NAME)
11+
@net.minecraftforge.fml.common.Mod(modid = MODID, name = NAME, version = VERSION)
12+
@cpw.mods.fml.common.Mod(modid = MODID, name = NAME, version = VERSION)
1213
public class PluginPermsForNgtMain {
1314
public static final String MODID = "plugin-permissions-for-ngt";
1415
public static final String NAME = "plugin permissions for ngt";
16+
public static final String VERSION = Constants.VERSION;
1517
private static final Logger LOGGER = LogManager.getLogger(MODID);
1618

1719
public static final String PERM_PREFIX = "ngt-permissions.";

0 commit comments

Comments
 (0)