fix some more (reintroduced) bugs
All checks were successful
Publish to snapshot maven / build (push) Successful in 23s

This commit is contained in:
moehreag 2024-10-28 15:56:23 +01:00
parent d62987cda2
commit 78e7bdf68a
4 changed files with 10 additions and 7 deletions

View file

@ -7,7 +7,7 @@ plugins {
}
group = "dev.frogmc"
version = "0.0.1-alpha.29" + ("+local".takeUnless { project.hasProperty("FrogMCSnapshotsMavenPassword") } ?: "")
version = "0.0.1-alpha.30" + ("+local".takeUnless { project.hasProperty("FrogMCSnapshotsMavenPassword") } ?: "")
repositories {
maven {

View file

@ -190,6 +190,8 @@ class PhytotelmaPlugin : Plugin<Project> {
AccessWidener.checkAW(aw, ProjectStorage.get(project).remappedGameJarPath!!)
}
}
temp.moveTo(file.toPath(), overwrite = true)
temp.deleteIfExists()
}
}

View file

@ -14,15 +14,15 @@ abstract class MinecraftConfiguration @Inject constructor(
) {
val version: Property<String> = objects.property(String::class.java).unset()
val parchment: Property<ParchmentConfiguration> = objects.property(ParchmentConfiguration::class.java).convention(objects.newInstance(ParchmentConfiguration::class.java))
val parchment: ParchmentConfiguration = objects.newInstance(ParchmentConfiguration::class.java, version)
val manifestUrl: Property<String> = objects.property(String::class.java).convention(Constants.MOJANG_MANIFEST_URL)
fun parchment(action: Action<ParchmentConfiguration>) {
action.execute(parchment.get())
action.execute(parchment)
}
abstract class ParchmentConfiguration @Inject constructor(objects: ObjectFactory) {
val gameVersion: Property<String> = objects.property(String::class.java).unset()
abstract class ParchmentConfiguration @Inject constructor(objects: ObjectFactory, minecraftVersion: Property<String>) {
val gameVersion: Property<String> = objects.property(String::class.java).convention(minecraftVersion)
val version: Property<String> = objects.property(String::class.java).unset()
}
}

View file

@ -38,7 +38,7 @@ abstract class PhytotelmaGradleExtensionImpl @Inject constructor(
error("No Minecraft version provided!")
}
val version = mcConf.version.get()
val parchment = mcConf.parchment.get()
val parchment = mcConf.parchment
val projectData = ProjectStorage.get(project)
projectData.manifestUrl = mcConf.manifestUrl.get()
@ -53,7 +53,8 @@ abstract class PhytotelmaGradleExtensionImpl @Inject constructor(
projectData.localCacheDir!!.resolve("net/minecraft/server/${version}/server-${version}.txt")
).reverse(),
ParchmentProvider.getParchment(
version,
parchment.gameVersion.get(),
parchment.version.get(),
projectData.localCacheDir!!.resolve("org/parchmentmc/parchment/${parchment.gameVersion.get()}/${parchment.version.get()}")
)
)