You've already forked apache-beam-examples
Add sensor pipeline
This commit is contained in:
11
buildSrc/build.gradle.kts
Executable file
11
buildSrc/build.gradle.kts
Executable file
@ -0,0 +1,11 @@
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
|
||||
}
|
20
buildSrc/settings.gradle.kts
Executable file
20
buildSrc/settings.gradle.kts
Executable file
@ -0,0 +1,20 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
create("libs") {
|
||||
from(files("../gradle/libs.versions.toml"))
|
||||
}
|
||||
}
|
||||
}
|
62
buildSrc/src/main/kotlin/com/barrelsofdata/project-conventions.gradle.kts
Executable file
62
buildSrc/src/main/kotlin/com/barrelsofdata/project-conventions.gradle.kts
Executable file
@ -0,0 +1,62 @@
|
||||
package com.barrelsofdata;
|
||||
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
val libs = the<LibrariesForLibs>()
|
||||
|
||||
plugins {
|
||||
java
|
||||
}
|
||||
|
||||
configurations {
|
||||
implementation {
|
||||
resolutionStrategy.failOnVersionConflict()
|
||||
}
|
||||
}
|
||||
|
||||
val integrationTest by sourceSets.creating
|
||||
configurations[integrationTest.implementationConfigurationName].extendsFrom(configurations.testImplementation.get())
|
||||
configurations[integrationTest.runtimeOnlyConfigurationName].extendsFrom(configurations.testRuntimeOnly.get())
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform {
|
||||
filter {
|
||||
includeTestsMatching("*Test")
|
||||
excludeTestsMatching("*IT")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val integrationTestTask = tasks.register<Test>("integrationTest") {
|
||||
description = "Runs integration tests"
|
||||
group = "verification"
|
||||
useJUnitPlatform {
|
||||
filter {
|
||||
includeTestsMatching("*IT")
|
||||
excludeTestsMatching("*Test")
|
||||
}
|
||||
}
|
||||
testClassesDirs = integrationTest.output.classesDirs
|
||||
classpath = configurations[integrationTest.runtimeClasspathConfigurationName] + integrationTest.output
|
||||
}
|
||||
|
||||
tasks.check {
|
||||
dependsOn(integrationTestTask)
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(libs.versions.java.get())
|
||||
vendor = JvmVendorSpec.ADOPTIUM
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Jar> {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
doFirst {
|
||||
from (configurations.runtimeClasspath.get().map { if (it.isDirectory()) it else zipTree(it) })
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user