summaryrefslogtreecommitdiff
path: root/plugin/src/main/kotlin/moe/nea/archenemy/mojang/ArchenemyMojangPlugin.kt
blob: 4f0132279602bb252c82054a96f246d7274deed8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package moe.nea.archenemy.mojang

import org.gradle.api.Plugin
import org.gradle.api.Project

class ArchenemyMojangPlugin : Plugin<Project> {

    override fun apply(project: Project) {
        project.rootProject.tasks.maybeCreate(
            "downloadMinecraftVersionManifest",
            DownloadMinecraftVersionManifest::class.java
        )

        val rootExt = project.rootProject.extensions
        if (rootExt.findByName("archenemyShared") == null) {
            rootExt.create("archenemyShared", ArchenemySharedExtension::class.java, project.rootProject)
        }
        val mojang = project.extensions.create(
            "mojang", ArchenemyMojangExtension::class.java, project,
        )
    }
}