Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buildscript {
- repositories {
- jcenter()
- maven { url "http://files.minecraftforge.net/maven" }
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
- dependencies {
- classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
- classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.0.10"
- }
- }
- apply plugin: 'net.minecraftforge.gradle.forge'
- // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
- apply plugin: 'com.matthewprenger.cursegradle'
- apply plugin: 'java'
- version = "0.1.6"
- group = "io.github.lukas2005.lda" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
- archivesBaseName = "lda"
- def jxbrowser_version = "6.21"
- def core_plugin = "io.github.lukas2005.DeviceModApps.coremod.CoreModMain"
- sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
- compileJava {
- sourceCompatibility = targetCompatibility = '1.8'
- options.encoding = 'UTF-8'
- }
- repositories {
- maven { url 'https://jitpack.io' }
- maven { url 'http://repo.jenkins-ci.org/releases' }
- maven { url = "https://mrcrayfish.com/maven" }
- }
- minecraft {
- version = "1.12.2-14.23.1.2555"
- runDir = "run"
- // the mappings can be changed at any time, and must be in the following format.
- // snapshot_YYYYMMDD snapshot are built nightly.
- // stable_# stables are built at the discretion of the MCP team.
- // Use non-default mappings at your own risk. they may not always work.
- // simply re-run your setup task after changing the mappings to update your workspace.
- mappings = "snapshot_20171003"
- // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
- clientJvmArgs = ["-Dfml.coreMods.load=$core_plugin"]
- serverJvmArgs = ["-Dfml.coreMods.load=$core_plugin"]
- }
- // Add "embedded" configuration
- configurations {
- embed
- compile.extendsFrom(embed)
- embedCore
- compile.extendsFrom(embedCore)
- jarInJarEmbed
- compile.extendsFrom(jarInJarEmbed)
- }
- dependencies {
- // you may put jars on which you depend on in ./libs
- // or you may define them like so..
- //compile "some.group:artifact:version:classifier"
- //compile "some.group:artifact:version"
- jarInJarEmbed files("lib/mp3spi1.9.5.jar")
- jarInJarEmbed files("lib/vorbisspi1.0.3.jar")
- embed files("lib/jl1.0.1.jar")
- embed files("lib/tritonus_share.jar")
- embed files("lib/jorbis-0.0.15.jar")
- embed files("lib/jogg-0.0.7.jar")
- embed files("lib/jxbrowser/licence.jar")
- embed files("lib/jxbrowser/lib/jxbrowser-"+jxbrowser_version+".jar")
- compile files("lib/jxbrowser/lib/jxbrowser-linux64-"+jxbrowser_version+".jar")
- compile files("lib/jxbrowser/lib/jxbrowser-mac-"+jxbrowser_version+".jar")
- compile files("lib/jxbrowser/lib/jxbrowser-win32-"+jxbrowser_version+".jar")
- embedCore files("lib/javassist.jar")
- compile 'com.mrcrayfish:device-api:0.4.0-1.12.2'
- embed 'org.apache.tika:tika-core:1.18'
- // https://mvnrepository.com/artifact/org.kohsuke/github-api
- embed ('org.kohsuke:github-api:1.90') {
- exclude group: 'commons-io'
- }
- embed ('com.google.apis:google-api-services-youtube:v3-rev186-1.23.0') {
- exclude group: 'com.google.guava'
- }
- //compile 'com.github.lukas2005:Device-Essentials:21f9e02c18a231d85e69bcfa6c1415682af07927'
- // real examples
- //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
- //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
- // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
- //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
- // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
- // except that these dependencies get remapped to your current MCP mappings
- //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
- //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
- // for more info...
- // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
- // http://www.gradle.org/docs/current/userguide/dependency_management.html
- }
- task coreJar(type: Jar) {
- from(sourceSets.main.output) {
- include 'io/github/lukas2005/DeviceModApps/coremod/**'
- }
- manifest.mainAttributes(
- "Implementation-Title": project.name + "-corePlugin",
- "Implementation-Version": "${project.version}",
- "Built-On": "${minecraft.version}-${minecraft.forgeVersion}",
- "FMLCorePlugin": "$core_plugin"
- )
- from configurations.embedCore.collect {
- exclude '.classpath'
- exclude '.project'
- exclude 'META-INF/LICENSE.txt'
- exclude 'META-INF/NOTICE.txt'
- exclude 'META-INF/LICENSE'
- exclude 'META-INF/NOTICE'
- exclude 'META-INF/DEPENDENCIES'
- it.isDirectory() ? it : zipTree(it)
- }
- classifier 'corePlugin'
- group = 'build'
- }
- reobf {
- coreJar {
- mappingType = 'SEARGE'
- }
- }
- task signCoreJar(type: SignJar) {
- onlyIf {
- project.hasProperty('sign_keyStore')
- }
- keyPass = findProperty('sign_keyPass')
- keyStore = findProperty('sign_keyStore')
- storePass = findProperty('sign_storePass')
- alias = findProperty('sign_alias')
- inputFile = coreJar.archivePath
- outputFile = coreJar.archivePath
- dependsOn reobfCoreJar
- }
- jar {
- dependsOn signCoreJar
- from(coreJar.archivePath.absolutePath) {
- include '*'
- }
- exclude 'io/github/lukas2005/DeviceModApps/coremod/**'
- def DEPS = coreJar.archivePath.name
- configurations.jarInJarEmbed.each {
- dep -> DEPS += ' ' + dep.getName()
- from(dep.getAbsolutePath()) {
- include '*'
- }
- }
- manifest.mainAttributes(
- "Implementation-Title": project.name,
- "Implementation-Version": "${project.version}",
- "Built-On": "${minecraft.version}-${minecraft.forgeVersion}",
- "Maven-Artifact":"${project.group}:${archivesBaseName}:${project.version}",
- "FMLAT": "${project.name}_at.cfg",
- "ContainedDeps": DEPS
- )
- classifier '' //this is the main jar!
- from configurations.embed.collect {
- exclude '.classpath'
- exclude '.project'
- exclude 'META-INF/LICENSE.txt'
- exclude 'META-INF/NOTICE.txt'
- exclude 'META-INF/LICENSE'
- exclude 'META-INF/NOTICE'
- exclude 'META-INF/DEPENDENCIES'
- it.isDirectory() ? it : zipTree(it)
- }
- }
- processResources {
- // this will ensure that this task is redone when the versions change.
- inputs.property "version", project.version
- inputs.property "mcversion", project.minecraft.version
- // replace stuff in mcmod.info, nothing else
- from(sourceSets.main.resources.srcDirs) {
- include 'mcmod.info'
- // replace version and mcversion
- expand 'version':project.version, 'mcversion':project.minecraft.version
- }
- // copy everything else except the mcmod.info
- from(sourceSets.main.resources.srcDirs) {
- exclude 'mcmod.info'
- }
- }
- curseforge {
- apiKey = findProperty('curse_apiKey')
- project {
- id = '284797'
- changelog = 'Some changes'
- releaseType = 'release'
- relations {
- requiredLibrary 'mrcrayfishs-device-mod'
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement