Skip to content

Commit 2b60acc

Browse files
authored
Merge pull request #160 from InfernalSuite/develop
Properly bump API version
2 parents 8e10c97 + 336793d commit 2b60acc

File tree

7 files changed

+24
-13
lines changed

7 files changed

+24
-13
lines changed

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fun convertPlugin(plugin: Provider<PluginDependency>): String {
1818
dependencies {
1919
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
2020
implementation(convertPlugin(libs.plugins.blossom))
21-
implementation(convertPlugin(libs.plugins.gitprops))
21+
implementation(convertPlugin(libs.plugins.indragit))
2222
implementation(convertPlugin(libs.plugins.profiles))
2323
implementation(convertPlugin(libs.plugins.kotlin.jvm))
2424
implementation(convertPlugin(libs.plugins.lombok))

buildSrc/src/main/kotlin/asp.base-conventions.gradle.kts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import net.kyori.indra.git.IndraGitExtension
2+
13
plugins {
24
`java-library`
3-
id("com.gorylenko.gradle-git-properties")
5+
id("net.kyori.indra.git")
46
}
57

68
group = rootProject.providers.gradleProperty("group").get()
@@ -43,16 +45,10 @@ tasks {
4345
.tags("apiNote:a:API Note", "implSpec:a:Implementation Requirements", "implNote:a:Implementation Note")
4446
}
4547

46-
val git = withType<com.gorylenko.GenerateGitPropertiesTask> {
47-
outputs.upToDateWhen { false }
48-
gitProperties.extProperty = "git"
49-
}.first()
50-
5148
processResources {
5249
filteringCharset = Charsets.UTF_8.name()
53-
dependsOn(git)
5450
filesMatching(listOf("paper-plugin.yml", "version.txt")) {
55-
expand("gitCommitId" to git.generatedProperties["git.commit.id"])
51+
expand("gitCommitId" to (project.the<IndraGitExtension>().commit()?.name ?: "unknown"))
5652
}
5753
}
5854
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import net.kyori.indra.git.IndraGitExtension
2+
import org.gradle.kotlin.dsl.the
3+
4+
plugins {
5+
id("net.kyori.indra.git")
6+
}
7+
8+
version = "${rootProject.providers.gradleProperty("apiVersion").get()}-${the<IndraGitExtension>().commit()?.name ?: "SNAPSHOT"}"

buildSrc/src/main/kotlin/asp.publishing-conventions.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,13 @@ extensions.configure<ProfilesExtension>("profiles") {
6969
repositories {
7070
maven {
7171
name = "infernalsuite"
72-
url = uri("https://repo.infernalsuite.com/repository/maven-snapshots/")
72+
73+
url = if("${project.version}".endsWith("-SNAPSHOT")) {
74+
uri("https://repo.infernalsuite.com/repository/maven-snapshots/")
75+
} else {
76+
uri("https://repo.infernalsuite.com/repository/maven-releases/")
77+
}
78+
7379
credentials {
7480
username = project.property("ISUsername") as String?
7581
password = project.property("ISPassword") as String?

core/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id("asp.base-conventions")
3+
id("asp.internal-conventions")
34
id("asp.publishing-conventions")
45
}
56

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=com.infernalsuite.asp
2-
apiVersion=4.0.0-SNAPSHOT
2+
apiVersion=4.0.0
33
version=1.21.4-R0.1-SNAPSHOT
44

55
mcVersion=1.21.4

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ bstats = "3.1.0"
77
cloud-core = "2.0.0"
88
cloud-minecraft = "2.0.0-beta.10"
99
configurate = "4.1.2"
10-
gradle-git-properties = "2.4.2"
10+
indra-git = "3.1.3"
1111
gradle-profiles = "0.54.0"
1212
hikari = "6.2.1"
1313
kotlin = "1.9.25"
@@ -23,7 +23,7 @@ zstd = "1.5.6-8"
2323

2424
[plugins]
2525
blossom = { id = "net.kyori.blossom", version.ref = "blossom" }
26-
gitprops = { id = "com.gorylenko.gradle-git-properties", version.ref = "gradle-git-properties" }
26+
indragit = { id = "net.kyori.indra.git", version.ref = "indra-git" }
2727
profiles = { id = "org.kordamp.gradle.profiles", version.ref = "gradle-profiles" }
2828
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
2929
lombok = { id = "io.freefair.lombok", version.ref = "lombok-plugin" }

0 commit comments

Comments
 (0)