Add gradle/ide.gradle file to mark src/integration-test/java sources as an IJ Test Sources Root.

This commit is contained in:
John Blum
2017-06-06 20:07:41 -07:00
parent 23518bf0f1
commit 6b25500f09
9 changed files with 50 additions and 17 deletions

View File

@@ -17,3 +17,5 @@ description = 'Spring Session Data Geode'
ext.releaseBuild = version.endsWith('RELEASE')
ext.snapshotBuild = version.endsWith('SNAPSHOT')
ext.milestoneBuild = !(releaseBuild || snapshotBuild)
ext.IDE_GRADLE = "$rootDir/gradle/ide.gradle"

View File

@@ -1,7 +1,10 @@
apply plugin: 'io.spring.convention.docs'
apply plugin: 'io.spring.convention.spring-test'
apply from: IDE_GRADLE
dependencies {
testCompile project(':spring-session-data-geode')
testCompile "javax.servlet:javax.servlet-api"
testCompile "junit:junit"
@@ -9,6 +12,10 @@ dependencies {
testCompile "org.mockito:mockito-core"
testCompile "edu.umd.cs.mtc:multithreadedtc"
testCompile "org.springframework:spring-test"
testCompile "org.springframework.security:spring-security-core"
testCompile "org.springframework.security:spring-security-test"
testCompile "org.springframework.security:spring-security-web"
}
def versions = dependencyManagement.managedVersions
@@ -19,18 +26,16 @@ asciidoctor {
def ghUrl = "https://github.com/spring-projects/spring-session/tree/$ghTag"
attributes 'version-snapshot': snapshotBuild,
'version-milestone': milestoneBuild,
'version-release': releaseBuild,
'gh-url': ghUrl,
'gh-samples-url': "$ghUrl/samples/",
'download-url' : "https://github.com/spring-projects/spring-session/archive/${ghTag}.zip",
'spring-session-version' : version,
'spring-version' : versions['org.springframework:spring-core'],
'lettuce-version' : versions['io.lettuce:lettuce-core'],
'hazelcast-version' : versions['com.hazelcast:hazelcast'],
'docs-itest-dir' : rootProject.projectDir.path + '/docs/src/integration-test/java/',
'docs-test-dir' : rootProject.projectDir.path + '/docs/src/test/java/',
'docs-test-resources-dir' : rootProject.projectDir.path + '/docs/src/test/resources/',
'samples-dir' : rootProject.projectDir.path + '/samples/',
'session-main-resources-dir' : rootProject.projectDir.path + '/spring-session/src/main/resources/'
'version-milestone': milestoneBuild,
'version-release': releaseBuild,
'gh-url': ghUrl,
'gh-samples-url': "$ghUrl/samples/",
'download-url' : "https://github.com/spring-projects/spring-session/archive/${ghTag}.zip",
'spring-version' : versions['org.springframework:spring-core'],
'spring-session-version' : version,
'docs-itest-dir' : rootProject.projectDir.path + '/docs/src/integration-test/java/',
'docs-test-dir' : rootProject.projectDir.path + '/docs/src/test/java/',
'docs-test-resources-dir' : rootProject.projectDir.path + '/docs/src/test/resources/',
'samples-dir' : rootProject.projectDir.path + '/samples/',
'session-main-resources-dir' : rootProject.projectDir.path + '/spring-session/src/main/resources/'
}

6
gradle/ide.gradle Normal file
View File

@@ -0,0 +1,6 @@
idea {
module {
testSourceDirs += file('src/integration-test/java')
}
}

View File

@@ -1,7 +1,10 @@
apply plugin: 'io.spring.convention.spring-sample-boot'
apply plugin: "application"
apply from: IDE_GRADLE
dependencies {
compile project(':spring-session-data-geode')
compile "org.springframework.boot:spring-boot-starter-thymeleaf"
compile "org.springframework.boot:spring-boot-starter-web"
@@ -15,6 +18,7 @@ dependencies {
integrationTestCompile seleniumDependencies
integrationTestRuntime "org.springframework.shell:spring-shell"
}
run {

View File

@@ -1,7 +1,10 @@
apply plugin: 'io.spring.convention.spring-sample-war'
apply plugin: "gemfire-server"
apply from: IDE_GRADLE
dependencies {
compile project(':spring-session-data-geode')
compile "org.springframework:spring-web"
compile "org.webjars:bootstrap"
@@ -19,4 +22,5 @@ dependencies {
integrationTestCompile seleniumDependencies
integrationTestRuntime "org.springframework.shell:spring-shell"
}
}

View File

@@ -1,6 +1,9 @@
apply plugin: 'io.spring.convention.spring-sample-war'
apply from: IDE_GRADLE
dependencies {
compile project(':spring-session-data-geode')
compile "org.springframework:spring-web"
compile "org.webjars:bootstrap"
@@ -16,4 +19,5 @@ dependencies {
integrationTestCompile "org.assertj:assertj-core"
integrationTestRuntime "org.springframework.shell:spring-shell"
}

View File

@@ -1,7 +1,10 @@
apply plugin: 'io.spring.convention.spring-sample-war'
apply plugin: "gemfire-server"
apply from: IDE_GRADLE
dependencies {
compile project(':spring-session-data-geode')
compile "org.springframework:spring-web"
compile "org.webjars:bootstrap"
@@ -19,4 +22,5 @@ dependencies {
integrationTestCompile seleniumDependencies
integrationTestRuntime "org.springframework.shell:spring-shell"
}

View File

@@ -1,6 +1,9 @@
apply plugin: 'io.spring.convention.spring-sample-war'
apply from: IDE_GRADLE
dependencies {
compile project(':spring-session-data-geode')
compile "org.springframework:spring-web"
compile "org.webjars:bootstrap"
@@ -16,4 +19,5 @@ dependencies {
integrationTestCompile "org.assertj:assertj-core"
integrationTestRuntime "org.springframework.shell:spring-shell"
}

View File

@@ -1,5 +1,6 @@
apply plugin: 'io.spring.convention.spring-module'
apply plugin: 'io.spring.convention.integration-test'
apply from: IDE_GRADLE
description = "Spring Session Data Geode"
@@ -21,7 +22,6 @@ dependencies {
testCompile "edu.umd.cs.mtc:multithreadedtc:$multithreadedtcVersion"
testCompile "org.springframework:spring-test"
testCompile "org.springframework:spring-web"
testCompile "org.springframework.security:spring-security-test"
testCompile slf4jDependencies
integrationTestRuntime "org.springframework.shell:spring-shell"