build.gradle 1.43 KB
Newer Older
Florian Lugou's avatar
Florian Lugou committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/*
 * This build file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java project to get you started.
 * For more details take a look at the Java Quickstart chapter in the Gradle
 * user guide available at https://docs.gradle.org/3.5/userguide/tutorial_java_projects.html
 */

ext {
    absPath = projectDir.getAbsolutePath()
}

subprojects {
    apply plugin: 'java'
15
    sourceCompatibility = 1.8
Florian Lugou's avatar
Florian Lugou committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
    // version =

    sourceSets {
        main {
            java {
                srcDir 'src/main/java'
            }
        }
        test {
            java {
                srcDir 'src/test/java'
            }
        }
    }

    repositories {
        flatDir {
            dirs "${rootProject.absPath}/libs"
        }
    }

37
    test.workingDir "${rootProject.absPath}/ttool/build"
38
    libsDirName = "${rootProject.absPath}/build"
Florian Lugou's avatar
Florian Lugou committed
39 40 41

    task copyRuntimeLibs(type: Copy) {
        from configurations.runtime
Florian Lugou's avatar
Florian Lugou committed
42
        from 'runtime'
43
        into "${rootProject.absPath}/build"
Florian Lugou's avatar
Florian Lugou committed
44 45 46 47
    }
    build.finalizedBy(copyRuntimeLibs)

    clean.doFirst {
48
        delete "${rootProject.absPath}/build"
Florian Lugou's avatar
Florian Lugou committed
49 50
    }
}
51 52 53 54 55 56 57 58 59

allprojects {
    gradle.projectsEvaluated {
        tasks.withType(JavaCompile) {
            options.encoding = 'UTF-8'
            options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Xlint:cast" << "-Xlint:divzero" << "-Xlint:empty" << "-Xlint:finally" << "-Xlint:fallthrough"
        }
    }
}