|
| 1 | +buildscript { |
| 2 | + repositories { |
| 3 | + maven { url = 'https://files.minecraftforge.net/maven' } |
| 4 | + jcenter() |
| 5 | + mavenCentral() |
| 6 | + } |
| 7 | + dependencies { |
| 8 | + classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true |
| 9 | + } |
| 10 | +} |
| 11 | + |
| 12 | +apply plugin: 'net.minecraftforge.gradle' |
| 13 | + |
| 14 | +version = modVersion |
| 15 | +group = modGroup |
| 16 | +archivesBaseName = modBaseName |
| 17 | + |
| 18 | +sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' |
| 19 | + |
| 20 | +minecraft { |
| 21 | + // The mappings can be changed at any time, and must be in the following format. |
| 22 | + // snapshot_YYYYMMDD Snapshot are built nightly. |
| 23 | + // stable_# Stables are built at the discretion of the MCP team. |
| 24 | + // Use non-default mappings at your own risk. they may not always work. |
| 25 | + // Simply re-run your setup task after changing the mappings to update your workspace. |
| 26 | + mappings channel: 'stable', version: '60-1.15' |
| 27 | + // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. |
| 28 | + |
| 29 | + // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') |
| 30 | + |
| 31 | + // Default run configurations. |
| 32 | + // These can be tweaked, removed, or duplicated as needed. |
| 33 | + runs { |
| 34 | + client { |
| 35 | + workingDirectory project.file('run') |
| 36 | + |
| 37 | + // Recommended logging data for a userdev environment |
| 38 | + property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' |
| 39 | + |
| 40 | + // Recommended logging level for the console |
| 41 | + property 'forge.logging.console.level', 'debug' |
| 42 | + |
| 43 | + mods { |
| 44 | + timestampchat { |
| 45 | + source sourceSets.main |
| 46 | + } |
| 47 | + } |
| 48 | + } |
| 49 | + |
| 50 | + server { |
| 51 | + workingDirectory project.file('run') |
| 52 | + |
| 53 | + // Recommended logging data for a userdev environment |
| 54 | + property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' |
| 55 | + |
| 56 | + // Recommended logging level for the console |
| 57 | + property 'forge.logging.console.level', 'debug' |
| 58 | + |
| 59 | + mods { |
| 60 | + timestampchat { |
| 61 | + source sourceSets.main |
| 62 | + } |
| 63 | + } |
| 64 | + } |
| 65 | + |
| 66 | + data { |
| 67 | + workingDirectory project.file('run') |
| 68 | + |
| 69 | + // Recommended logging data for a userdev environment |
| 70 | + property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' |
| 71 | + |
| 72 | + // Recommended logging level for the console |
| 73 | + property 'forge.logging.console.level', 'debug' |
| 74 | + |
| 75 | + args '--mod', 'timestampchat', '--all', '--output', file('src/generated/resources/') |
| 76 | + |
| 77 | + mods { |
| 78 | + timestampchat { |
| 79 | + source sourceSets.main |
| 80 | + } |
| 81 | + } |
| 82 | + } |
| 83 | + } |
| 84 | +} |
| 85 | + |
| 86 | +dependencies { |
| 87 | + // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed |
| 88 | + // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. |
| 89 | + // The userdev artifact is a special name and will get all sorts of transformations applied to it. |
| 90 | + minecraft 'net.minecraftforge:forge:1.15.2-31.1.0' |
| 91 | + |
| 92 | +} |
0 commit comments