Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
122 lines (107 sloc) 2.92 KB
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
apply from: new File("./dependencies.gradle")
dependencies {
classpath dep.gradleBuildScan
classpath dep.kotlinGradlePlugin
classpath dep.junitGradlePlugin
classpath dep.shadowJarPlugin
classpath dep.mavenPublishGradlePlugin
classpath dep.spotlessPlugin
classpath dep.wirePlugin
}
}
apply plugin: 'com.gradle.build-scan'
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
tasks.register("testShardNonHibernate") {
group = "Continuous integration"
description = "Runs all tests that don't depend on misk-hibernate. " +
"This target is intended for manually sharding tests to make CI faster."
}
tasks.register("testShardHibernate") {
group = "Continuous integration"
description = "Runs all tests that depend on misk-hibernate. " +
"This target is intended for manually sharding tests to make CI faster."
}
subprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'com.diffplug.gradle.spotless'
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath dep.shadowJarPlugin
}
}
repositories {
mavenCentral()
jcenter()
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
allWarningsAsErrors = true
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
allWarningsAsErrors = true
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin/'
test.java.srcDirs += 'src/test/kotlin/'
}
spotless {
kotlin {
target "**/*.kt"
ktlint(dep.ktlintVersion).userData(['indent_size': '2', 'continuation_indent_size' : '2'])
}
}
compileKotlin.dependsOn 'spotlessKotlinApply'
dependencies {
testImplementation dep.junitApi
testRuntimeOnly dep.junitEngine
}
// We have to set the dokka configuration after evaluation since the com.vanniktech.maven.publish
// plugin overwrites our dokka configuration on projects where it's applied.
afterEvaluate { p ->
p.tasks.dokka {
reportUndocumented = false
skipDeprecated = true
jdkVersion = 8
}
}
test {
useJUnitPlatform()
testLogging {
events "started", "passed", "skipped", "failed"
exceptionFormat = 'full'
}
}
if (rootProject.file("hooks.gradle").exists()) {
apply from: rootProject.file("hooks.gradle")
}
if (["misk-aws","misk-events","misk-jobqueue","misk-hibernate","misk-hibernate-testing"].contains(name)) {
rootProject.getTasksByName("testShardHibernate", false).first().dependsOn.add(test)
} else {
rootProject.getTasksByName("testShardNonHibernate", false).first().dependsOn.add(test)
}
if (!name.startsWith("samples:")) {
apply plugin: 'com.vanniktech.maven.publish'
}
}
You can’t perform that action at this time.