Skip to content

Commit 1176318

Browse files
authoredSep 22, 2024
Merge pull request #64 from PlaceholderAPI/feature/read-version-from-manifest
build: read version from MANIFEST
2 parents 77b245d + 1b200d3 commit 1176318

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎build.gradle.kts

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ dependencies {
1818
}
1919

2020
tasks {
21-
java {
21+
jar {
22+
manifest {
23+
attributes["Implementation-Title"] = "server"
24+
attributes["Implementation-Version"] = project.version
25+
}
2226
targetCompatibility = JavaVersion.VERSION_1_8
2327
sourceCompatibility = JavaVersion.VERSION_1_8
2428
}

‎src/main/java/at/helpch/placeholderapi/expansion/server/ServerExpansion.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public final class ServerExpansion extends PlaceholderExpansion implements Cache
6363

6464
@Override
6565
public @NotNull String getVersion() {
66-
return "2.7.2";
66+
return getClass().getPackage().getImplementationVersion();
6767
}
6868

6969
@Override

0 commit comments

Comments
 (0)