Skip to content
Snippets Groups Projects
build.gradle 1.44 KiB
/*
 * 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'
    sourceCompatibility = 1.7
    // version =

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

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

    test.workingDir "${rootProject.absPath}/tests/util/fr.tpt.ttool.tests.util"
    libsDirName = "${rootProject.absPath}/bin"

    task copyRuntimeLibs(type: Copy) {
        from configurations.runtime
        from 'runtime'
        into "${rootProject.absPath}/bin"
    }
    build.finalizedBy(copyRuntimeLibs)

    clean.doFirst {
        delete "${rootProject.absPath}/bin"
    }
}

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"
        }
    }
}