123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- apply from: 'dependencyDefine.gradle'
- buildscript {
- ext {
- springBootVersion = '2.1.3.RELEASE'
- }
- repositories {
- mavenLocal()
- mavenCentral()
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
- dependencies {
- classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
- }
- }
- subprojects {
- apply plugin: 'java'
- apply plugin: "idea"
- apply plugin: 'maven'
- apply plugin: 'org.springframework.boot'
- apply plugin: 'io.spring.dependency-management'
- group = 'com.qxgmat'
- version = '0.0.1-SNAPSHOT'
- sourceCompatibility = 1.8
- targetCompatibility = 1.8
- tasks.withType(JavaCompile) {
- options.encoding = 'UTF-8'
- }
- repositories {
- mavenLocal()
- maven { url = "http://maven.aliyun.com/nexus/content/groups/public" }
- mavenCentral()
- }
- configurations{
- parentClasspath {}
- }
-
- task clearJar(type: Delete) {
- delete "$buildDir/libs/lib"
- }
-
- task copyJar(type: Copy, dependsOn: 'clearJar') {
- from configurations.compileClasspath
- into "$buildDir/libs/lib"
- }
-
- task clearCom(type: Copy, dependsOn: 'copyJar') {
- delete "$buildDir/libs/lib/com"
- }
- dependencies {
- compileClasspath("org.springframework.boot:spring-boot-starter")
- compileClasspath("org.springframework.boot:spring-boot-starter-web")
- compileClasspath('org.springframework.boot:spring-boot-starter-aop')
- compileClasspath('org.springframework.boot:spring-boot-starter-jdbc')
- compileClasspath('org.springframework.boot:spring-boot-starter-data-jpa')
- compileClasspath("org.springframework.boot:spring-boot-starter-actuator")
- compileClasspath('org.springframework.boot:spring-boot-starter-logging')
- compileClasspath('org.springframework.boot:spring-boot-starter-cache')
- compileClasspath('org.springframework.boot:spring-boot-starter-data-redis')
- compileClasspath("org.springframework.boot:spring-boot-devtools")
- compileClasspath('mysql:mysql-connector-java')
- compileClasspath(libraries."mybatis", libraries."mybatis-page")
- compileClasspath("tk.mybatis:mapper-spring-boot-starter:2.1.5"){
- exclude group: "javax.persistence"
- }
- testCompile("org.springframework.boot:spring-boot-starter-test")
- compileClasspath group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.9'
- compileClasspath group: 'com.alibaba', name: 'fastjson', version: '1.2.46'
- compileClasspath 'javax.persistence:javax.persistence-api:2.2'
- compileClasspath group: 'net.ipip', name: 'ipdb', version: '1.1.2'
- compileClasspath fileTree(dir:'libs',include:['*.jar'])
- }
- def env = System.getProperty("ENV") ?: (System.getenv("ENV") ?: "dev")
- println(env)
- sourceSets {
- main {
- resources {
- srcDirs = ["src/main/resources", "src/main/profile/$env", "src/main/java"]
- }
- }
- }
- }
- configure(subprojects.findAll {it.name.contains('api')}) {
- apply plugin: 'war'
- apply plugin: 'application'
- springBoot {
- buildInfo()
- }
- dependencies {
- }
- }
- project(':data') {
- dependencies {
- compile(project(":tools"))
- }
- }
- project(':gateway-api') {
- dependencies {
- compile(project(":tools"))
- compile(project(":data"))
- compileClasspath project(path:":tools", configuration: 'parentClasspath')
- compileClasspath project(path:":data", configuration: 'parentClasspath')
- }
- }
|