|
| 1 | +buildscript { |
| 2 | + repositories { |
| 3 | + maven { url("https://files.minecraftforge.net/maven") } |
| 4 | + maven { url("https://libraries.minecraft.net") } |
| 5 | + maven { url("https://plugins.gradle.org/m2/") } |
| 6 | + jcenter() |
| 7 | + mavenCentral() |
| 8 | + } |
| 9 | + dependencies { |
| 10 | + classpath( |
| 11 | + group: "net.minecraftforge.gradle", |
| 12 | + name: "ForgeGradle", |
| 13 | + version: forge_gradle_version, |
| 14 | + changing: true |
| 15 | + ) |
| 16 | + classpath( |
| 17 | + "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" |
| 18 | + ) |
| 19 | + classpath( |
| 20 | + "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" |
| 21 | + ) |
| 22 | + } |
| 23 | +} |
| 24 | + |
| 25 | +apply(plugin: "net.minecraftforge.gradle") |
| 26 | +apply(plugin: "kotlin") |
| 27 | +apply(plugin: "kotlinx-serialization") |
| 28 | + |
| 29 | +version = module_version |
| 30 | +group = "com.mairwunnx.$module_id" |
| 31 | +archivesBaseName = module_name |
| 32 | + |
| 33 | +minecraft { |
| 34 | + mappings( |
| 35 | + channel: forge_mappings_channel_type, |
| 36 | + version: forge_mappings_channel_version |
| 37 | + ) |
| 38 | + |
| 39 | + runs { |
| 40 | + client { |
| 41 | + //noinspection GroovyAssignabilityCheck |
| 42 | + workingDirectory(project.file(dev_run_client_path)) |
| 43 | + property("forge.logging.markers", "SCAN,REGISTRIES,REGISTRYDUMP") |
| 44 | + property("forge.logging.console.level", "debug") |
| 45 | + mods { |
| 46 | + ProjectEssentialsBackup { |
| 47 | + //noinspection GroovyAssignabilityCheck |
| 48 | + source(sourceSets.main) |
| 49 | + } |
| 50 | + } |
| 51 | + } |
| 52 | + |
| 53 | + server { |
| 54 | + //noinspection GroovyAssignabilityCheck |
| 55 | + workingDirectory(project.file(dev_run_server_path)) |
| 56 | + property("forge.logging.markers", "SCAN,REGISTRIES,REGISTRYDUMP") |
| 57 | + property("forge.logging.console.level", "debug") |
| 58 | + mods { |
| 59 | + ProjectEssentialsBackup { |
| 60 | + //noinspection GroovyAssignabilityCheck |
| 61 | + source(sourceSets.main) |
| 62 | + } |
| 63 | + } |
| 64 | + } |
| 65 | + } |
| 66 | +} |
| 67 | + |
| 68 | +repositories { |
| 69 | + jcenter() |
| 70 | + mavenCentral() |
| 71 | + maven { url("https://minecraft.curseforge.com/api/maven/") } |
| 72 | + maven { url("https://libraries.minecraft.net") } |
| 73 | + maven { url("https://jitpack.io") } |
| 74 | +} |
| 75 | + |
| 76 | +dependencies { |
| 77 | + minecraft(group: "net.minecraftforge", name: "forge", version: forge_version) |
| 78 | + compile(group: "com.mojang", name: "brigadier", version: brigadier_version) |
| 79 | + compile( |
| 80 | + group: "org.jetbrains.kotlinx", |
| 81 | + name: "kotlinx-serialization-runtime", |
| 82 | + version: kotlinx_serialization_version |
| 83 | + ) |
| 84 | + compile( |
| 85 | + group: "org.jetbrains.kotlin", |
| 86 | + name: "kotlin-stdlib-$kotlin_jdk_version_target", |
| 87 | + version: kotlin_version |
| 88 | + ) |
| 89 | + compile( |
| 90 | + group: "com.github.projectessentials", |
| 91 | + name: "ProjectEssentials-Permissions", |
| 92 | + version: ess_perm_version |
| 93 | + ) |
| 94 | + compile( |
| 95 | + group: "com.github.projectessentials", |
| 96 | + name: "ProjectEssentials-Core", |
| 97 | + version: ess_core_version |
| 98 | + ) |
| 99 | + compile( |
| 100 | + group: "com.github.projectessentials", |
| 101 | + name: "ProjectEssentials-Cooldown", |
| 102 | + version: ess_cooldown_version |
| 103 | + ) |
| 104 | +} |
| 105 | + |
| 106 | +jar { |
| 107 | + manifest { |
| 108 | + attributes([ |
| 109 | + "Specification-Title" : module_name, |
| 110 | + "Specification-Vendor" : module_vendor, |
| 111 | + "Specification-Version" : module_version, |
| 112 | + "Implementation-Title" : module_name, |
| 113 | + "Implementation-Version" : module_version, |
| 114 | + "Implementation-Vendor" : module_vendor, |
| 115 | + "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") |
| 116 | + ]) |
| 117 | + } |
| 118 | +} |
| 119 | + |
| 120 | +sourceCompatibility = targetCompatibility = |
| 121 | + compileJava.sourceCompatibility = |
| 122 | + compileJava.targetCompatibility = project_jvm_version_target |
| 123 | + |
| 124 | +compileKotlin.kotlinOptions.jvmTarget = |
| 125 | + compileTestKotlin.kotlinOptions.jvmTarget = project_jvm_version_target |
0 commit comments