build.gradle 2.74 KB
group 'com.viontech'
version '1.0-SNAPSHOT'
buildscript {
    repositories {
        maven { url 'http://192.168.9.220:8081/nexus/content/groups/public/' }
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:2.1.3.RELEASE")
    }
}

/***
 * 使用的插件
 */
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'idea'
// 使用spring boot
apply plugin: "org.springframework.boot"
// 使用spring boot的自动依赖管理
apply plugin: 'io.spring.dependency-management'

/**
 * 设置jdk的版本
 */
sourceCompatibility = 1.8
targetCompatibility = 1.8

tasks.withType(JavaCompile) {
    options.compilerArgs << '-Xlint:unchecked'
    options.deprecation = true
}
repositories {
    maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
}



/***
 * 依赖
 */
dependencies {
    compile("org.springframework.boot:spring-boot-starter-parent:2.1.3.RELEASE") {
        exclude module: 'hibernate-core'
        exclude module: 'hibernate-entitymanager'
    }
    compile("org.springframework.boot:spring-boot-starter-web")
    compile("org.springframework.boot:spring-boot-starter-data-jpa") {
        exclude module: 'hibernate-core'
        exclude module: 'hibernate-entitymanager'
    }
    compile ("org.springframework.boot:spring-boot-starter-websocket")
    compile ("org.springframework.boot:spring-boot-starter-jdbc")
    compile ("org.springframework.boot:spring-boot-starter-activemq")
    compile ("org.springframework.boot:spring-boot-autoconfigure")
    compile ("org.springframework.kafka:spring-kafka")
    compile ("org.apache.activemq:activemq-pool")
    compile ('org.springframework.cloud:spring-cloud-starter-openfeign:2.1.3.RELEASE')

    // compileOnly('org.springframework.boot:spring-boot-starter-tomcat')s
    // hibernate 集成
    compile('org.hibernate:hibernate-core:5.2.12.Final')
    compile('org.hibernate:hibernate-entitymanager:5.2.12.Final')
    compile('org.hibernate:hibernate-ehcache:5.2.12.Final')
    compile('com.fasterxml.jackson.datatype:jackson-datatype-hibernate5:2.9.4')
    compile("org.postgresql:postgresql:9.3-1102-jdbc41")
    compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile 'org.springframework:spring-core'
    compile group: 'com.alibaba', name: 'druid', version: '1.0.18'
    compile group: 'com.alibaba', name: 'fastjson', version: '1.2.47'
    compile group: 'org.projectlombok', name: 'lombok', version: '1.18.4'
    compile("org.apache.commons:commons-lang3:3.5")
    compile("net.sf.json-lib:json-lib:2.4:jdk15")
}