build.gradle 4.08 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 12


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

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

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

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

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

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

    compile 'org.easytesting:fest-assert:1.4'
    compile 'org.easytesting:fest-util:1.1.6'
55

56
    compile files('libraries/BetterWithLib-1.3-dev.jar')
primetoxinz's avatar
primetoxinz committed
57
    compile files('libraries/Thaumcraft-1.12.2-6.1.BETA16-deobf.jar')
Beeto's avatar
Beeto committed
58 59
}

primetoxinz's avatar
primetoxinz committed
60 61 62
sourceSets {
    main {
        java {
primetoxinz's avatar
primetoxinz committed
63
//            exclude '**/Thaumcraft.java'
primetoxinz's avatar
primetoxinz committed
64
        }
65 66 67
        resources {
            exclude 'assets/betterwithmods/docs/en_us/assets/**'
        }
primetoxinz's avatar
primetoxinz committed
68 69
    }
}
70

71 72 73 74
jar {
    manifest {
        attributes 'FMLAT': 'bwm_at.cfg'
    }
75
    exclude 'assets/betterwithmods/docs/en_us/assets/**'
Beeto's avatar
Beeto committed
76 77 78
}

task deobfJar(type: Jar) {
79 80
    from sourceSets.main.output
    classifier "dev"
Beeto's avatar
Beeto committed
81 82 83
}

artifacts {
84
    archives deobfJar
Beeto's avatar
Beeto committed
85 86
}

primetoxinz's avatar
primetoxinz committed
87 88 89 90 91 92 93 94 95 96 97
configurations {
    deployerJars
}

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

uploadArchives {
    repositories {
        mavenDeployer {
primetoxinz's avatar
primetoxinz committed
98 99 100 101 102 103 104 105 106
            repository(url: "file://" + System.getenv("local_maven"))
            pom {
                groupId = project.group
                version
                artifactId = project.archivesBaseName
                project {
                    name project.archivesBaseName
                    packaging 'jar'
                    description 'BetterWithMods'
107
                    url 'https://github.com/BetterWithMods/BetterWithMods'
primetoxinz's avatar
primetoxinz committed
108
                    scm {
109 110 111
                        url 'https://github.com/BetterWithMods/BetterWithMods.git'
                        connection 'scm:git:git@github.com:BetterWithMods/BetterWithMods.git'
                        developerConnection 'scm:git:git@github.com:BetterWithMods/BetterWithMods.git'
primetoxinz's avatar
primetoxinz committed
112 113 114
                    }
                    issueManagement {
                        system 'github'
115
                        url 'https://github.com/BetterWithMods/BetterWithMods/issues'
primetoxinz's avatar
primetoxinz committed
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
                    }
                    developers {
                        developer {
                            id 'primetoxinz'
                            name 'primetoxinz'
                            roles { role 'developer' }
                        }
                        developer {
                            id 'beetoguy'
                            name 'beetoguy'
                            roles { role 'developer' }
                        }
                    }
                }
            }
primetoxinz's avatar
primetoxinz committed
131 132 133 134
        }
    }
}

135 136 137 138 139
processResources {
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version
    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'
140
        expand 'version': project.version, 'mcversion': project.minecraft.version
141 142 143 144 145
    }
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}