build.gradle 2.92 KB
Newer Older
Beeto's avatar
Beeto committed
1 2 3
buildscript {
    repositories {
        jcenter()
4
        maven { url = "http://files.minecraftforge.net/maven" }
Beeto's avatar
Beeto committed
5 6
    }
    dependencies {
7
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
Beeto's avatar
Beeto committed
8 9
    }
}
primetoxinz's avatar
primetoxinz committed
10 11

apply plugin: "maven"
Beeto's avatar
Beeto committed
12
apply plugin: 'net.minecraftforge.gradle.forge'
13

primetoxinz's avatar
primetoxinz committed
14
version = "1.12-2.3.20"
15
group = "betterwithmods"
16
archivesBaseName = "BetterWithMods"
Beeto's avatar
Beeto committed
17

18
sourceCompatibility = targetCompatibility = "1.8"
19 20 21
compileJava {
    sourceCompatibility = targetCompatibility = "1.8"
}
primetoxinz's avatar
primetoxinz committed
22

primetoxinz's avatar
primetoxinz committed
23
if (System.getenv().BUILD_NUMBER != null) {//adds the build number to the end of the version string if on a build server
24
    version += "-${System.getenv().BUILD_NUMBER}"
primetoxinz's avatar
primetoxinz committed
25 26
}

Beeto's avatar
Beeto committed
27
minecraft {
28
    version = "${minecraft_version}-${forge_version}"
Beeto's avatar
Beeto committed
29
    runDir = "run"
30
    mappings = mcp_mappings
primetoxinz's avatar
primetoxinz committed
31
    replace "%VERSION%": "${project.version}"
32
    useDepAts = true
33
}
primetoxinz's avatar
primetoxinz committed
34

35
repositories {
36
    maven { url "http://maven.blamejared.com" }
37
    maven { url 'http://dvs1.progwml6.com/files/maven' }
38
    maven { url "http://maven.amadornes.com/" }
39
    maven { url "http://www.ryanliptak.com/maven/" }
primetoxinz's avatar
primetoxinz committed
40
    maven { url "http://maven.tterrag.com" }
primetoxinz's avatar
primetoxinz committed
41
    maven { url "https://maven.thiakil.com/" }
primetoxinz's avatar
primetoxinz committed
42
    mavenCentral()
43
}
Beeto's avatar
Beeto committed
44
dependencies {
45
    deobfCompile "mezz.jei:jei_1.12.2:+"
46
    deobfCompile "applecore:AppleCore:1.12.2-3.1.0"
47
    deobfCompile "team.chisel.ctm:CTM:MC1.12+"
48
    deobfCompile "com.azanor.baubles:Baubles:1.12-1.5.2"
49 50

    if (!project.hasProperty("singleproject")) {
primetoxinz's avatar
primetoxinz committed
51
        deobfCompile "betterwithmods.core:BetterWithLib:1.12-1.5"
52 53 54 55
    } else {
        compile project(':BetterWithLib')
    }

56 57
    compile "MCMultiPart2:MCMultiPart:2.4.1"
    runtime "MCMultiPart2:MCMultiPart:2.4.1"
58 59 60

    compile 'org.easytesting:fest-assert:1.4'
    compile 'org.easytesting:fest-util:1.1.6'
primetoxinz's avatar
primetoxinz committed
61
    compileOnly files('libraries/Thaumcraft-1.12.2-6.1.BETA16-deobf.jar')
Beeto's avatar
Beeto committed
62 63
}

primetoxinz's avatar
primetoxinz committed
64 65 66
sourceSets {
    main {
        java {
primetoxinz's avatar
primetoxinz committed
67
//            exclude '**/Thaumcraft.java'
primetoxinz's avatar
primetoxinz committed
68
        }
69 70 71
        resources {
            exclude 'assets/betterwithmods/docs/en_us/assets/**'
        }
primetoxinz's avatar
primetoxinz committed
72 73
    }
}
74

75 76 77 78
jar {
    manifest {
        attributes 'FMLAT': 'bwm_at.cfg'
    }
79
    exclude 'assets/betterwithmods/docs/en_us/assets/**'
Beeto's avatar
Beeto committed
80 81 82
}

task deobfJar(type: Jar) {
83 84
    from sourceSets.main.output
    classifier "dev"
Beeto's avatar
Beeto committed
85 86 87
}

artifacts {
88
    archives deobfJar
Beeto's avatar
Beeto committed
89 90
}

primetoxinz's avatar
primetoxinz committed
91 92 93 94 95 96 97 98 99 100 101
configurations {
    deployerJars
}

dependencies {
    deployerJars 'org.apache.maven.wagon:wagon-ftp:2.2'
}

uploadArchives {
    repositories {
        mavenDeployer {
primetoxinz's avatar
primetoxinz committed
102
            repository(url: "file://" + (System.getenv("local_maven") != null ? System.getenv("local_maven") : System.getenv("bamboo_local_maven")))
primetoxinz's avatar
primetoxinz committed
103 104 105 106
        }
    }
}

107 108 109 110 111
processResources {
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version
    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'
112
        expand 'version': project.version, 'mcversion': project.minecraft.version
113 114 115 116 117
    }
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}