/
minecraftbackup
/
lambda
Обзор
Документация
Войти
/
minecraftbackup
/
lambda
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
3.1
build.gradle
191 строка
5 KB
Constructor
Remove submodules (#238)
25 фев 2022, 03:48
Не верифицирован
25 фев 2022, 03:48
c8ca60a
Код
Авторство
О чём код?
version project.modVersion group project.modGroup buildscript { repositories { mavenCentral() maven { url = 'https://maven.minecraftforge.net/' } maven { url = 'https://repo.spongepowered.org/maven/' } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:5.+' classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion" } } apply plugin: 'idea' apply plugin: 'kotlin' apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.jetbrains.dokka' apply plugin: 'org.spongepowered.mixin' compileJava { sourceCompatibility = targetCompatibility = '1.8' options.encoding = 'UTF-8' } compileKotlin.kotlinOptions { freeCompilerArgs += '-Xlambdas=indy' freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn' freeCompilerArgs += '-Xopt-in=kotlin.contracts.ExperimentalContracts' } repositories { maven { url = 'https://repo.spongepowered.org/maven/' } maven { url = 'https://impactdevelopment.github.io/maven/' } maven { url = "https://jitpack.io" } mavenCentral() } minecraft { mappings channel: "$mappingsChannel", version: "$mappingsVersion" runs { client { workingDirectory project.file('run') property 'fml.coreMods.load', 'com.lambda.client.LambdaCoreMod' property 'mixin.env.disableRefMap', 'true' // Disable refmap so we don't get trolled by Baritone property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' } } } configurations { jarLibs // Force choosing the correct nightly build because Mac OS chooses an invalid one all { resolutionStrategy { force 'org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209' } } } dependencies { // Forge minecraft "net.minecraftforge:forge:$minecraftVersion-$forgeVersion" jarLibs('org.spongepowered:mixin:0.8.3') { exclude module: 'commons-io' exclude module: 'gson' exclude module: 'guava' exclude module: 'launchwrapper' exclude module: 'log4j-core' // we want to exclude this as well because 0.8.3 includes it too new for MC } // Hacky way to get mixin work annotationProcessor('org.spongepowered:mixin:0.8.3:processor') { exclude module: 'gson' } // Not the latest Reflections because it breaks Future compatibility :/ jarLibs('org.reflections:reflections:0.9.12') { exclude module: 'gson' exclude module: 'guava' } // Kotlin libs // kotlin-stdlib-common and annotations aren't required at runtime jarLibs("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion") { exclude module: 'kotlin-stdlib-common' exclude module: 'annotations' } jarLibs("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion") { exclude module: 'kotlin-stdlib-common' exclude module: 'annotations' } jarLibs("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion") { exclude module: 'kotlin-stdlib-common' exclude module: 'annotations' } jarLibs("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") { exclude module: 'kotlin-stdlib-common' exclude module: 'annotations' } jarLibs("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion") { exclude module: 'kotlin-stdlib-common' exclude module: 'annotations' } jarLibs "com.github.cbyrneee:DiscordIPC:e18542f600" // Add them back to compileOnly (provided) compileOnly "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion" compileOnly 'org.jetbrains:annotations:23.0.0' // This Baritone will NOT be included in the jar implementation 'com.github.cabaletta:baritone:1.2.14' // This Baritone WILL be included in the jar jarLibs 'cabaletta:baritone-api:1.2' // Add everything in jarLibs to implementation (compile) implementation configurations.jarLibs } mixin { defaultObfuscationEnv 'searge' add sourceSets.main, 'mixins.lambda.refmap.json' } processResources { exclude '**/rawimagefiles' from(sourceSets.main.resources.srcDirs) { duplicatesStrategy = DuplicatesStrategy.INCLUDE include 'mcmod.info' expand version: version, 'mcversion': minecraftVersion } } task sourceJar(type: Jar) { // Generate sources group 'build' description 'Assemble API library source archive' archiveClassifier.set('api-source') from sourceSets.main.allSource } task apiJar(type: Jar) { group 'build' description 'Assemble API library archive' archiveClassifier.set('api') from sourceSets.main.output } // Don't put baritone mixin here please c: jar { manifest.attributes( 'Manifest-Version': 1.0, 'MixinConfigs': 'mixins.lambda.json', 'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker', 'FMLCorePluginContainsFMLMod': 'true', 'FMLCorePlugin': 'com.lambda.client.LambdaCoreMod', 'ForceLoadAsMod': 'true' ) // Copy needed libs to jar from { exclude "**/module-info.class" configurations.jarLibs.collect { it.isDirectory() ? it : zipTree(it) } } } task buildApi { group 'build' dependsOn sourceJar dependsOn apiJar description 'Assemble API library archives' }