Advertisement
Guest User

build.gradle

a guest
Apr 15th, 2021
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.10 KB | None | 0 0
  1. buildscript {
  2.     repositories {
  3.         maven { url = 'https://files.minecraftforge.net/maven' }
  4.         jcenter()
  5.         mavenCentral()
  6.     }
  7.     dependencies {
  8.         classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
  9.     }
  10. }
  11.        
  12. apply plugin: 'net.minecraftforge.gradle'
  13. apply plugin: 'eclipse'
  14. apply plugin: 'maven-publish'
  15.  
  16. version = '1.0'
  17. group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  18. archivesBaseName = 'modid'
  19.  
  20. sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
  21.  
  22. minecraft {
  23.     mappings channel: 'snapshot', version: '20171003-1.12'
  24.     // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
  25.    
  26.     // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  27.  
  28.    
  29.     runs {
  30.         client {
  31.             workingDirectory project.file('run')
  32.  
  33.             property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  34.  
  35.             property 'forge.logging.console.level', 'debug'
  36.  }
  37.  
  38.  server {
  39.  
  40.  property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  41.  
  42.  property 'forge.logging.console.level', 'debug'
  43.             }
  44.        }
  45.  }
  46.  
  47.  dependencies {
  48.    minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2854'
  49.  
  50.  
  51. }
  52.  
  53. jar {
  54.     manifest {
  55.         attributes([
  56.             "Specification-Title": "examplemod",
  57.             "Specification-Vendor": "examplemodsareus",
  58.             "Specification-Version": "1",
  59.             "Implementation-Title": project.name,
  60.             "Implementation-Version": "${version}",
  61.             "Implementation-Vendor" :"examplemodsareus",
  62.             "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  63.         ])
  64.     }
  65. }
  66.  
  67. jar.finalizedBy('reobfJar')
  68.  
  69. //publish.dependsOn('reobfJar')
  70.  
  71. publishing {
  72.     publications {
  73.         mavenJava(MavenPublication) {
  74.            artifact jar
  75.         }
  76.     }
  77.     repositories {
  78.         maven {
  79.             url "file:///${project.projectDir}/mcmodsrepo"
  80.         }
  81.     }
  82. }
  83.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement