Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buildscript {
- repositories {
- maven { url = 'https://files.minecraftforge.net/maven' }
- maven { url "https://libraries.minecraft.net" }
- maven { url 'https://minecraft.curseforge.com/api/maven/' }
- jcenter()
- mavenCentral()
- }
- dependencies {
- classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.30"
- }
- }
- apply plugin: 'net.minecraftforge.gradle'
- apply plugin: 'eclipse'
- apply plugin: 'maven-publish'
- apply plugin: 'kotlin'
- version = '0.0.1'
- group = 'com.mairwunnx.projectessentials'
- archivesBaseName = 'Project Essentials'
- sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
- compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = '1.8'
- repositories {
- maven { url 'https://minecraft.curseforge.com/api/maven/' }
- maven { url "https://libraries.minecraft.net" }
- }
- configurations {
- mod
- }
- minecraft {
- mappings channel: 'snapshot', version: '20190719-1.14.3'
- runs {
- client {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
- property 'forge.logging.console.level', 'debug'
- mods {
- examplemod {
- source sourceSets.main
- }
- }
- }
- server {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
- property 'forge.logging.console.level', 'debug'
- mods {
- examplemod {
- source sourceSets.main
- }
- }
- }
- data {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
- property 'forge.logging.console.level', 'debug'
- args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/')
- mods {
- examplemod {
- source sourceSets.main
- }
- }
- }
- }
- }
- dependencies {
- minecraft 'net.minecraftforge:forge:1.14.4-28.0.73'
- compile "kottle:Kottle:$kottleVersion"
- mod "kottle:Kottle:$kottleVersion"
- compile 'com.mojang:brigadier:1.0.17'
- }
- task installMods(type: Copy, dependsOn: "deinstallMods") {
- from { configurations.mod }
- include "**/*.jar"
- into file("run/mods")
- }
- task deinstallMods(type: Delete) {
- delete fileTree(dir: "run/mods", include: "*.jar")
- }
- project.afterEvaluate {
- project.tasks['prepareRuns'].dependsOn(project.tasks['installMods'])
- }
- jar {
- manifest {
- attributes([
- "Specification-Title": "Project Essentials",
- "Specification-Vendor": "MairwunNx (Pavel Erokhin)",
- "Specification-Version": "1", // We are version 1 of ourselves
- "Implementation-Title": project.name,
- "Implementation-Version": "${version}",
- "Implementation-Vendor" :"MairwunNx (Pavel Erokhin)",
- "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
- ])
- }
- }
- def reobfFile = file("$buildDir/reobfJar/output.jar")
- def reobfArtifact = artifacts.add('default', reobfFile) {
- type 'jar'
- builtBy 'reobfJar'
- }
- publishing {
- publications {
- mavenJava(MavenPublication) {
- artifact reobfArtifact
- }
- }
- repositories {
- maven {
- url "file:///${project.projectDir}/mcmodsrepo"
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement