我正在使用Intellij IDEA 2017.1.4。我是新手。我在Gradle上获得了一个多模块弹簧项目。问题是,当我“刷新所有gradle项目” (在IDEA的侧面)时,需要数小时。有一天一天。由于添加了依赖项或其他内容,我有时需要刷新。
以下是我的根 build.gradle 文件。请帮忙。
group 'tv.videoready'
version = "1.0.0-RELEASE"
description = "Mobile/Web API's Application"
buildscript {
ext {
springBootVersion = '1.4.0.RELEASE'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.4.17")
}
}
apply plugin: 'idea'
apply plugin: "com.gorylenko.gradle-git-properties"
jar {
baseName = 'rest-api'
version = '1.0.0-RELEASE'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'http://artifactory.videoready.tv/artifactory/libs-release-local' }
maven { url 'http://artifactory.videoready.tv/artifactory/libs-snapshot-local' }
}
gitProperties {
dateFormat = "d MMM yyyy HH:mm:ss Z"
dateFormatTimeZone = "UTC"
gitRepositoryRoot = new File("${project.rootDir}")
gitPropertiesDir = new File("${project.rootDir}/src/main/resources")
}
ext {
springBootVersion = "1.4.0.RELEASE"
mysqlConnectorVersion = '5.1.39'
swaggerVersion = '2.7.0'
}
dependencies {
// Actuator
compile("org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}")
compile 'org.springframework.hateoas:spring-hateoas:0.20.0.RELEASE'
compile project(":login")
compile project(":config")
compile project(":device")
compile project(":password")
compile project(":sms")
compile project(":remote-record")
compile project(":otp")
compile project(":profile")
compile("de.codecentric:spring-boot-admin-starter-client:1.4.4")
}
allprojects {
apply plugin: 'java'
apply plugin: 'spring-boot'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'http://artifactory.videoready.tv/artifactory/libs-release-local' }
maven { url 'http://artifactory.videoready.tv/artifactory/libs-snapshot-local' }
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}")
compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
compile("org.springframework.boot:spring-boot-starter-jetty:${springBootVersion}")
compile("org.springframework.boot:spring-boot-starter-amqp:${springBootVersion}")
compile("mysql:mysql-connector-java:${mysqlConnectorVersion}")
compile group: 'org.hibernate', name: 'hibernate-validator', version: '4.3.2.Final'
//HTTP Client
compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.5'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.2'
compile(group: 'tv.videoready', name: 'module-logger', version: '2.0.2-RELEASE')
compile(group: 'tv.videoready', name: 'cors-filter', version: '1.0.0')
// compile(group: 'tv.videoready', name: 'common-sql-domains', version: '1.5.8-SNAPSHOT')
compile files("/home/divya/projects/tatasky/common-services/common-sql-domains/build/libs/ common-sql-domains-3.1.0-RELEASE.jar")
compile(group: 'tv.videoready', name: 'mm-domains', version: '3.1.4-SNAPSHOT')
compile(group: 'tv.videoready', name: 'common-constants', version: '1.4.10-SNAPSHOT')
compile(group: 'tv.videoready', name: 'domain-pojo-utils', version: '1.2.0-SNAPSHOT')
compile(group: 'tv.videoready', name: 'validation-util', version: '1.2.0-SNAPSHOT')
compile(group: 'tv.videoready', name: 'search-client', version: '1.4.4-SNAPSHOT'){
exclude(group: 'tv.videoready', module: 'common-constants')
exclude(group: 'tv.videoready', module: 'common-sql-domains')
exclude(group: 'tv.videoready', module: 'mm-domains')
}
compile(group: 'tv.videoready', name: 'common-pojo', version: '1.3.23-SNAPSHOT')
compile(group: 'tv.videoready', name: 'i-spy-client', version: '1.0.2-SNAPSHOT')
compile(group: 'tv.videoready', name: 'cache', version: '2.0.26-SNAPSHOT')
compile('com.hazelcast:hazelcast:3.7.5')
compile('com.hazelcast:hazelcast-client:3.7.5')
compile("io.springfox:springfox-swagger2:${swaggerVersion}")
compile("io.springfox:springfox-swagger-ui:${swaggerVersion}")
}
configurations {
compile.exclude module: ("spring-boot-starter-tomcat")
compile.exclude module: ("spring-boot-starter-logging")
}
sourceSets.main.resources {
srcDir '../src/main/resources'
}
}
subprojects {
group = 'tv.videoready'
version = '1.0.0-RELEASE'
}
processResources {
filesMatching("**/application.properties") {
expand(project.properties)
}
}
bootRun {
systemProperties = System.properties
systemProperty "log4j.configurationFactory", "tv.videoready.logger.LoggingConfigurationFactory"
systemProperty "mockRRM", true
systemProperty "dev.hazelcast.setup.enabled", "false"
systemProperty "dev.hazelcast.cluster.group.password", "hari"
systemProperty "hazelcast.cluster.group.password", "hari"
systemProperty "spring.config.location", "classpath:hazelcast-dev.properties"
systemProperty "jsse.enableSNIExtension", "false"
}