You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
116 lines
4.1 KiB
116 lines
4.1 KiB
/* |
|
* Copyright 2012-present the original author or authors. |
|
* |
|
* Licensed under the Apache License, Version 2.0 (the License); |
|
* you may not use this file except in compliance with the License. |
|
* You may obtain a copy of the License at |
|
* |
|
* https://www.apache.org/licenses/LICENSE-2.0 |
|
* |
|
* Unless required by applicable law or agreed to in writing, software |
|
* distributed under the License is distributed on an "AS IS" BASIS, |
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
* See the License for the specific language governing permissions and |
|
* limitations under the License. |
|
*/ |
|
|
|
plugins { |
|
id "java" |
|
id "org.springframework.boot.docker-test" |
|
} |
|
|
|
description = "Spring Boot cache smoke test" |
|
|
|
sourceSets { |
|
redisTest { |
|
compileClasspath += sourceSets.main.output |
|
runtimeClasspath += sourceSets.main.output |
|
} |
|
} |
|
|
|
configurations { |
|
caffeine |
|
couchbase |
|
ehcache |
|
hazelcast |
|
infinispan |
|
} |
|
|
|
dependencies { |
|
implementation(project(":starter:spring-boot-starter-actuator")) |
|
implementation(project(":starter:spring-boot-starter-cache")) |
|
implementation(project(":starter:spring-boot-starter-webmvc")) |
|
|
|
caffeine(enforcedPlatform(project(":platform:spring-boot-dependencies"))) |
|
caffeine("com.github.ben-manes.caffeine:caffeine") |
|
|
|
couchbase(enforcedPlatform(project(":platform:spring-boot-dependencies"))) |
|
couchbase(project(":starter:spring-boot-starter-data-couchbase")) |
|
|
|
ehcache(enforcedPlatform(project(":platform:spring-boot-dependencies"))) |
|
ehcache("javax.cache:cache-api") |
|
ehcache("org.ehcache:ehcache::jakarta") |
|
|
|
hazelcast(enforcedPlatform(project(":platform:spring-boot-dependencies"))) |
|
hazelcast(project(":module:spring-boot-hazelcast")) |
|
hazelcast("com.hazelcast:hazelcast-spring") |
|
|
|
infinispan(enforcedPlatform(project(":platform:spring-boot-dependencies"))) |
|
infinispan("javax.cache:cache-api") |
|
infinispan("org.infinispan:infinispan-commons") |
|
infinispan("org.infinispan:infinispan-component-annotations") |
|
infinispan("org.infinispan:infinispan-core") |
|
infinispan("org.infinispan:infinispan-jcache") |
|
|
|
dockerTestImplementation(project(":core:spring-boot-testcontainers")) |
|
dockerTestImplementation(project(":starter:spring-boot-starter-data-redis-test")) |
|
dockerTestImplementation(project(":test-support:spring-boot-docker-test-support")) |
|
dockerTestImplementation("com.redis:testcontainers-redis") |
|
dockerTestImplementation("org.testcontainers:testcontainers-junit-jupiter") |
|
|
|
testImplementation(project(":starter:spring-boot-starter-test")) |
|
} |
|
|
|
def testCaffeine = tasks.register("testCaffeine", Test) { |
|
description = "Runs the tests against Caffeine" |
|
classpath = sourceSets.test.runtimeClasspath + configurations.caffeine |
|
testClassesDirs = testing.suites.test.sources.output.classesDirs |
|
} |
|
|
|
def testCouchbase = tasks.register("testCouchbase", Test) { |
|
description = "Runs the tests against Couchbase" |
|
classpath = sourceSets.test.runtimeClasspath + configurations.couchbase |
|
testClassesDirs = testing.suites.test.sources.output.classesDirs |
|
} |
|
|
|
def testEhcache = tasks.register("testEhcache", Test) { |
|
description = "Runs the tests against Ehcache" |
|
classpath = sourceSets.test.runtimeClasspath + configurations.ehcache |
|
testClassesDirs = testing.suites.test.sources.output.classesDirs |
|
systemProperties = ["spring.cache.jcache.config" : "classpath:ehcache3.xml"] |
|
} |
|
|
|
def testHazelcast = tasks.register("testHazelcast", Test) { |
|
description = "Runs the tests against Hazelcast" |
|
classpath = sourceSets.test.runtimeClasspath + configurations.hazelcast |
|
testClassesDirs = testing.suites.test.sources.output.classesDirs |
|
} |
|
|
|
def testInfinispan = tasks.register("testInfinispan", Test) { |
|
description = "Runs the tests against Infinispan" |
|
classpath = sourceSets.test.runtimeClasspath + configurations.infinispan |
|
testClassesDirs = testing.suites.test.sources.output.classesDirs |
|
systemProperties = ["spring.cache.jcache.config" : "classpath:infinispan.xml"] |
|
} |
|
|
|
tasks.named("check").configure { |
|
dependsOn testCaffeine, testCouchbase, testEhcache, testHazelcast, testInfinispan |
|
} |
|
|
|
tasks.named("compileTestJava") { |
|
options.nullability.checking = "tests" |
|
} |
|
|
|
tasks.named("compileDockerTestJava") { |
|
options.nullability.checking = "tests" |
|
}
|
|
|