Created
August 25, 2020 15:34
-
-
Save marchermans/4aff974bbcf6a198fb9402834956c2ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
maven { url = 'https://files.minecraftforge.net/maven' } | |
jcenter() | |
mavenCentral() | |
} | |
dependencies { | |
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true | |
} | |
} | |
plugins { | |
id "com.matthewprenger.cursegradle" version "1.0.9" | |
} | |
repositories { | |
maven { | |
name 'LDTTeam - Modding' | |
url 'https://ldtteam.jfrog.io/ldtteam/modding/' | |
} | |
repositories { | |
maven { | |
name = "CurseForge" | |
url = "https://minecraft.curseforge.com/api/maven/" | |
} | |
} | |
} | |
apply plugin: 'net.minecraftforge.gradle' | |
sourceSets { | |
api { | |
java { | |
srcDir 'src/api/java' | |
} | |
resources { | |
srcDir 'src/api/resources' | |
} | |
compileClasspath += configurations.getByName("minecraft") | |
} | |
//noinspection GroovyAssignabilityCheck | |
main { | |
java { | |
srcDir 'src/main/java' | |
} | |
resources { | |
srcDir 'src/main/resources' | |
} | |
compileClasspath += sourceSets.api.output | |
runtimeClasspath += sourceSets.api.output | |
} | |
test { | |
java { | |
srcDir 'src/test/java' | |
} | |
resources { | |
srcDir 'src/test/resources' | |
} | |
compileClasspath += sourceSets.api.output | |
runtimeClasspath += sourceSets.api.output | |
} | |
} | |
version = modVersion | |
group = modGroup | |
archivesBaseName = modBaseName | |
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' | |
minecraft { | |
mappings channel: "${project.mcpChannel}", version: "${project.mcpVersion}" | |
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') | |
runs { | |
client { | |
workingDirectory project.file('run') | |
// Recommended logging data for a userdev environment | |
property 'forge.logging.markers', '' | |
// Recommended logging level for the console | |
property 'forge.logging.console.level', 'info' | |
mods { | |
equivalency { | |
source sourceSets.main | |
source sourceSets.api | |
} | |
} | |
} | |
server { | |
workingDirectory project.file('run') | |
// Recommended logging data for a userdev environment | |
property 'forge.logging.markers', '' | |
// Recommended logging level for the console | |
property 'forge.logging.console.level', 'info' | |
mods { | |
equivalency { | |
source sourceSets.main | |
source sourceSets.api | |
} | |
} | |
} | |
data { | |
workingDirectory project.file('run') | |
// Recommended logging data for a userdev environment | |
property 'forge.logging.markers', '' | |
// Recommended logging level for the console | |
property 'forge.logging.console.level', 'info' | |
args '--mod', 'equivalency', '--all', '--output', file('src/generated/resources/'), '--input', file('src/main/resources') | |
mods { | |
equivalency { | |
source sourceSets.main | |
source sourceSets.api | |
} | |
} | |
} | |
} | |
} | |
dependencies { | |
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed | |
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. | |
// The userdev artifact is a special name and will get all sorts of transformations applied to it. | |
minecraft "net.minecraftforge:forge:${project.exactMinecraftVersion}-${project.forgeVersion}" | |
// compile against the JEI API but do not include it at runtime | |
compileOnly fg.deobf("mezz.jei:jei-${project.exactMinecraftVersion}:${project.jeiVersion}:api") | |
// at runtime, use the full JEI jar | |
runtimeOnly fg.deobf("mezz.jei:jei-${project.exactMinecraftVersion}:${project.jeiVersion}") | |
// data generators. | |
implementation "com.ldtteam:datagenerators:${project.dataGeneratorsVersion}" | |
apiCompileOnly fg.deobf("com.ldtteam:aequivaleo:0.0.26-ALPHA:api") | |
runtimeOnly fg.deobf("com.ldtteam:aequivaleo:0.0.26-ALPHA") | |
// unit testing | |
testCompile 'junit:junit:4.11' | |
testCompile "org.mockito:mockito-core:1.+" | |
testCompile group: 'org.powermock', name: 'powermock-module-junit4', version: '1.6.5' | |
testCompile group: 'org.powermock', name: 'powermock-api-mockito', version: '1.6.5' | |
testCompile group: 'org.powermock', name: 'powermock-module-junit4-rule-agent', version: '1.6.5' | |
testCompile 'org.assertj:assertj-core:3.9.0' | |
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3' | |
//Utilities | |
apiCompile 'com.intellij:annotations:+@jar' | |
compile 'com.intellij:annotations:+@jar' | |
testCompile 'com.intellij:annotations:+@jar' | |
compile "org.jgrapht:jgrapht-core:${project.jgraphtVersion}" | |
compile "org.jgrapht:jgrapht-ext:${project.jgraphtVersion}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment