build.gradle 1018 字节
Newer Older
1
subprojects {
2

3 4 5
    apply plugin: 'java'
    apply plugin: 'maven'
    apply plugin: 'scala'
6

7 8
    group = 'io.github'
    version = '2.0.0'
9

10
    description = "Recording Learning, Work, Interview, Summary and Reflection"
11

12 13
    sourceCompatibility = 1.8
    targetCompatibility = 1.8
14

梦境迷离's avatar
梦境迷离 已提交
15

16
    repositories {
梦境迷离's avatar
梦境迷离 已提交
17

18 19 20 21 22 23 24 25 26 27 28
        maven { url "http://repo.maven.apache.org/maven2" }
    }

    sourceSets {
        main {
            scala {
                srcDirs = ['src/main/java', 'src/main/scala']
            }
            java {
                srcDirs = []
            }
梦境迷离's avatar
梦境迷离 已提交
29 30
        }
    }
31 32 33 34 35 36 37 38 39 40 41 42 43 44

    /**
     * 所有项目共用Scala2.12.8
     *
     * sbt有点慢,所以用了gradle,其他sbt项目不好继承进来,PS:降低编译速度
     */
    dependencies {
        compile group: 'junit', name: 'junit', version: '4.12'
        compile group: 'org.scala-lang', name: 'scala-library', version: '2.12.8'
    }

    [compileJava, compileScala, compileTestScala, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'

}