summaryrefslogtreecommitdiff
path: root/plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemySharedExtension.kt
diff options
context:
space:
mode:
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.kt20
1 files changed, 20 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
new file mode 100644
index 0000000..950446d
--- /dev/null
+++ b/plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemySharedExtension.kt
@@ -0,0 +1,20 @@
+package moe.nea.archenemy.mojang
+
+import org.gradle.api.Project
+import java.io.File
+
+abstract class ArchenemySharedExtension(val rootProject: Project) {
+ init {
+ require(rootProject == rootProject.rootProject)
+ }
+
+ fun getLocalCacheDirectory(): File {
+ return rootProject.rootDir.resolve(".gradle/archenemy")
+ }
+
+ fun getDownloadMinecraftVersionManifestTask(): DownloadMinecraftVersionManifest {
+ return rootProject.tasks.getByName("downloadMinecraftVersionManifest") as DownloadMinecraftVersionManifest
+ }
+
+ val minecraftProvider = MinecraftProvider(this)
+} \ No newline at end of file