diff options
author | Linnea Gräf <nea@nea.moe> | 2024-06-19 00:08:30 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-06-19 00:08:30 +0200 |
commit | 4d778b97ee33485af5236ad6bdfdd2949fd69cc2 (patch) | |
tree | 749fb202c133036d954a8fdbcfdea25750721cb2 /plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemySharedExtension.kt | |
parent | a453cc833f52cf1ccd52288edb73c6f0fbc0c7cc (diff) | |
download | archenemy-4d778b97ee33485af5236ad6bdfdd2949fd69cc2.tar.gz archenemy-4d778b97ee33485af5236ad6bdfdd2949fd69cc2.tar.bz2 archenemy-4d778b97ee33485af5236ad6bdfdd2949fd69cc2.zip |
fix stuff for pauline
Diffstat (limited to 'plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemySharedExtension.kt')
-rw-r--r-- | plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemySharedExtension.kt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemySharedExtension.kt b/plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemySharedExtension.kt index 950446d..1e5239b 100644 --- a/plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemySharedExtension.kt +++ b/plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemySharedExtension.kt @@ -16,5 +16,27 @@ abstract class ArchenemySharedExtension(val rootProject: Project) { return rootProject.tasks.getByName("downloadMinecraftVersionManifest") as DownloadMinecraftVersionManifest } + fun getDownloadVersionMetadataTask(version: String): DownloadVersionMetadata { + val taskName = "downloadMinecraftVersionMetadata$version" + val task = rootProject.tasks.findByName(taskName) + if (task != null) { + return task as DownloadVersionMetadata + } + return rootProject.tasks.create(taskName, DownloadVersionMetadata::class.java, version) + } + + fun getDownloadAssetsTask(version: String): DownloadAssets { + val taskName = "downloadMinecraftAssets$version" + val task = rootProject.tasks.findByName(taskName) + if (task != null) { + return task as DownloadAssets + } + return rootProject.tasks.create(taskName, DownloadAssets::class.java, version) + } + + fun getGlobalCacheDirectory(): File { + return rootProject.gradle.gradleUserHomeDir.resolve("caches/archenemy") + } + val minecraftProvider = MinecraftProvider(this) }
\ No newline at end of file |