mirror of
https://github.com/jlengrand/quarkus.git
synced 2026-03-10 08:41:22 +00:00
This changes the way Quarkus ClassLoading works, to allow for isolated class loaders. It also unifies how Quarkus is launched, so every different mode we support uses the same mechanism for both curation and launch. Tests are now run in an isolated ClassLoader, which means that a proxy is created that runs the tests from within the isolated ClassLoader. This currently has a quirk where @BeforeAll methods are run twice, which will be fixed in the next JUnit release. This can be worked around by using @QuarkusBeforeAll.
85 lines
2.4 KiB
Groovy
85 lines
2.4 KiB
Groovy
plugins {
|
|
id 'com.gradle.plugin-publish' version '0.10.1'
|
|
id 'java-gradle-plugin'
|
|
}
|
|
compileJava.options.encoding = 'UTF-8'
|
|
compileTestJava.options.encoding = 'UTF-8'
|
|
if (JavaVersion.current().isJava9Compatible()) {
|
|
compileJava.options.compilerArgs.addAll(['--release', '8'])
|
|
}
|
|
|
|
compileJava {
|
|
sourceCompatibility = '1.8'
|
|
targetCompatibility = '1.8'
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
api gradleApi()
|
|
implementation "io.quarkus:quarkus-bootstrap-core:${version}"
|
|
implementation "io.quarkus:quarkus-devtools-common:${version}"
|
|
implementation "io.quarkus:quarkus-platform-descriptor-json:${version}"
|
|
implementation "io.quarkus:quarkus-platform-descriptor-resolver-json:${version}"
|
|
implementation "io.quarkus:quarkus-development-mode:${version}"
|
|
|
|
testImplementation 'org.assertj:assertj-core:3.14.0'
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.2'
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.2'
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.5.2'
|
|
}
|
|
|
|
test {
|
|
testLogging {
|
|
events "passed", "skipped", "failed"
|
|
}
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
javadoc {
|
|
options.addStringOption('encoding', 'UTF-8')
|
|
}
|
|
|
|
pluginBundle {
|
|
website = 'https://quarkus.io/'
|
|
vcsUrl = 'https://github.com/quarkusio/quarkus'
|
|
tags = ['quarkus', 'quarkusio', 'graalvm']
|
|
}
|
|
|
|
gradlePlugin {
|
|
plugins {
|
|
quarkusPlugin {
|
|
id = 'io.quarkus'
|
|
implementationClass = 'io.quarkus.gradle.QuarkusPlugin'
|
|
displayName = 'Quarkus Plugin'
|
|
description = 'Builds a Quarkus application, and provides helpers to launch dev-mode, the Quarkus CLI, building of native images'
|
|
}
|
|
}
|
|
}
|
|
|
|
// Add a source set for the functional test suite
|
|
sourceSets {
|
|
functionalTest {
|
|
}
|
|
}
|
|
|
|
gradlePlugin.testSourceSets(sourceSets.functionalTest)
|
|
configurations.functionalTestImplementation.extendsFrom(configurations.testImplementation)
|
|
configurations.functionalTestRuntime.extendsFrom(configurations.testRuntimeOnly)
|
|
|
|
// Add a task to run the functional tests
|
|
task functionalTest(type: Test) {
|
|
description = "Runs functional tests"
|
|
group = "verification"
|
|
useJUnitPlatform()
|
|
testClassesDirs = sourceSets.functionalTest.output.classesDirs
|
|
classpath = sourceSets.functionalTest.runtimeClasspath
|
|
}
|
|
|
|
check {
|
|
// Run the functional tests as part of `check`
|
|
dependsOn(tasks.functionalTest)
|
|
} |