Skip to content
Snippets Groups Projects
Commit 661c834d authored by Björn Vonheiden's avatar Björn Vonheiden
Browse files

Extract streams, flink and commons dependencies to convention plugin

Extract the kafka streams and flink use case and load generator
and commons dependencies to a convention plugin to reduce the
complexety of the main build gradle file.
parent 019c3335
No related branches found
No related tags found
1 merge request!95Introduce Gradle convention plugins
Showing
with 152 additions and 136 deletions
...@@ -2,6 +2,13 @@ plugins { ...@@ -2,6 +2,13 @@ plugins {
id 'theodolite.java-commons' id 'theodolite.java-commons'
} }
repositories {
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies { dependencies {
// These dependencies are used internally, and not exposed to consumers on their own compile classpath. // These dependencies are used internally, and not exposed to consumers on their own compile classpath.
// implementation 'org.slf4j:slf4j-simple:1.7.25' // implementation 'org.slf4j:slf4j-simple:1.7.25'
......
// Inherited to all subprojects // Inherited to all subprojects
// Make shadow plugin available, used for flink
buildscript { buildscript {
repositories { repositories {
maven { maven {
...@@ -10,133 +11,16 @@ buildscript { ...@@ -10,133 +11,16 @@ buildscript {
} }
} }
// Variables used to distinct different subprojects
def useCaseProjects = subprojects.findAll {it -> it.name.matches('uc(.)*')}
def useCaseApplications = subprojects.findAll {it -> it.name.matches('uc[0-9]+-application')}
def useCaseApplicationsFlink = subprojects.findAll {it -> it.name.matches('uc[0-9]+-application-flink')}
def useCaseGenerators = subprojects.findAll {it -> it.name.matches('uc[0-9]+-workload-generator*')}
// Plugins // Plugins
allprojects { allprojects {
apply plugin: 'eclipse' apply plugin: 'eclipse'
} }
subprojects {
apply plugin: 'theodolite.java-conventions'
}
configure(useCaseProjects){
apply plugin: 'application'
}
configure(useCaseApplicationsFlink){
apply plugin: 'com.github.johnrengelman.shadow'
applicationDefaultJvmArgs = ["-Dlog4j.configuration=log4j.properties"]
}
// Check for updates every build // Check for updates every build
configurations.all { configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds' resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
} }
// Repositories for all projects
allprojects {
repositories {
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url 'https://packages.confluent.io/maven/'
}
maven {
url 'https://repository.apache.org/content/repositories/snapshots/'
} // TODO required?
}
}
// Dependencies for all Kafka Streams benchmarks (use case applications)
configure(useCaseApplications) {
dependencies {
// These dependencies are used internally, and not exposed to consumers on their own compile classpath.
implementation('org.industrial-devops:titan-ccp-common:0.1.0-SNAPSHOT') { changing = true }
implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true }
implementation 'org.apache.kafka:kafka-streams:2.6.0' // enable TransformerSuppliers
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.guava:guava:24.1-jre'
implementation 'org.slf4j:slf4j-simple:1.7.25'
implementation project(':application-kafkastreams-commons')
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
}
// Dependencies for all Flink benchmarks (use case applications)
configure(useCaseApplicationsFlink) {
ext {
flinkVersion = '1.12.2'
scalaBinaryVersion = '2.12'
}
dependencies {
// Special version required because of https://issues.apache.org/jira/browse/FLINK-13703
implementation('org.industrial-devops:titan-ccp-common:0.1.0-flink-ready-SNAPSHOT') { changing = true }
implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true }
// These dependencies are used internally, and not exposed to consumers on their own compile classpath.
implementation 'org.apache.kafka:kafka-clients:2.2.0'
implementation 'com.google.guava:guava:24.1-jre'
implementation 'org.slf4j:slf4j-simple:1.6.1'
compile project(':flink-commons')
//compile group: 'org.apache.kafka', name: 'kafka-clients', version: "2.2.0"
compile group: 'org.apache.flink', name: 'flink-java', version: "${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-streaming-java_${scalaBinaryVersion}", version:"${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-table-api-java-bridge_${scalaBinaryVersion}", version: "${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-table-planner-blink_${scalaBinaryVersion}", version: "${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-connector-kafka_${scalaBinaryVersion}", version: "${flinkVersion}"
implementation "org.apache.flink:flink-avro:${flinkVersion}"
implementation "org.apache.flink:flink-avro-confluent-registry:${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-runtime-web_${scalaBinaryVersion}", version: "${flinkVersion}" // TODO: remove after development
compile group: 'org.apache.flink', name: "flink-statebackend-rocksdb_${scalaBinaryVersion}", version: "${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-metrics-prometheus_${scalaBinaryVersion}", version: "${flinkVersion}"
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
run.classpath = sourceSets.main.runtimeClasspath
jar {
manifest {
attributes 'Built-By': System.getProperty('user.name'),
'Build-Jdk': System.getProperty('java.version')
}
}
shadowJar {
configurations = [project.configurations.compile]
zip64 true
}
}
// Dependencies for all load generators
configure(useCaseGenerators) {
dependencies {
// These dependencies are used internally, and not exposed to consumers on their own compile classpath.
implementation('org.industrial-devops:titan-ccp-common:0.1.0-SNAPSHOT') { changing = true }
implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true }
implementation 'org.slf4j:slf4j-simple:1.7.25'
// These dependencies are used for the workload-generator-commmon
implementation project(':workload-generator-commons')
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
}
allprojects { allprojects {
eclipse { eclipse {
classpath { classpath {
......
// to discover the precompiled script plugins
plugins { plugins {
id 'groovy-gradle-plugin' id 'groovy-gradle-plugin'
} }
......
plugins {
// common java conventions
id 'theodolite.java-conventions'
// make executable
id 'application'
}
plugins {
id 'theodolite.java-conventions'
id 'application' // executable
id 'com.github.johnrengelman.shadow' // create fat jar
}
applicationDefaultJvmArgs = ["-Dlog4j.configuration=log4j.properties"]
ext {
flinkVersion = '1.12.2'
scalaBinaryVersion = '2.12'
}
repositories {
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url 'https://packages.confluent.io/maven/'
}
}
dependencies {
// Special version required because of https://issues.apache.org/jira/browse/FLINK-13703
implementation('org.industrial-devops:titan-ccp-common:0.1.0-flink-ready-SNAPSHOT') { changing = true }
implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true }
// These dependencies are used internally, and not exposed to consumers on their own compile classpath.
implementation 'org.apache.kafka:kafka-clients:2.2.0'
implementation 'com.google.guava:guava:24.1-jre'
implementation 'org.slf4j:slf4j-simple:1.6.1'
compile project(':flink-commons')
//compile group: 'org.apache.kafka', name: 'kafka-clients', version: "2.2.0"
compile group: 'org.apache.flink', name: 'flink-java', version: "${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-streaming-java_${scalaBinaryVersion}", version:"${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-table-api-java-bridge_${scalaBinaryVersion}", version: "${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-table-planner-blink_${scalaBinaryVersion}", version: "${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-connector-kafka_${scalaBinaryVersion}", version: "${flinkVersion}"
implementation "org.apache.flink:flink-avro:${flinkVersion}"
implementation "org.apache.flink:flink-avro-confluent-registry:${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-runtime-web_${scalaBinaryVersion}", version: "${flinkVersion}" // TODO: remove after development
compile group: 'org.apache.flink', name: "flink-statebackend-rocksdb_${scalaBinaryVersion}", version: "${flinkVersion}"
compile group: 'org.apache.flink', name: "flink-metrics-prometheus_${scalaBinaryVersion}", version: "${flinkVersion}"
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
run.classpath = sourceSets.main.runtimeClasspath
jar {
manifest {
attributes 'Built-By': System.getProperty('user.name'),
'Build-Jdk': System.getProperty('java.version')
}
}
shadowJar {
configurations = [project.configurations.compile]
zip64 true
}
plugins {
// common java conventions
id 'theodolite.java-conventions'
// make executable
id 'application'
}
repositories {
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url 'https://packages.confluent.io/maven/'
}
}
dependencies {
// These dependencies are used internally, and not exposed to consumers on their own compile classpath.
implementation('org.industrial-devops:titan-ccp-common:0.1.0-SNAPSHOT') { changing = true }
implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true }
implementation 'org.apache.kafka:kafka-streams:2.6.0' // enable TransformerSuppliers
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.guava:guava:24.1-jre'
implementation 'org.slf4j:slf4j-simple:1.7.25'
implementation project(':application-kafkastreams-commons')
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
plugins {
// common java conventions
id 'theodolite.java-conventions'
// make executable
id 'application'
}
repositories {
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url 'https://packages.confluent.io/maven/'
}
}
dependencies {
// These dependencies are used internally, and not exposed to consumers on their own compile classpath.
implementation('org.industrial-devops:titan-ccp-common:0.1.0-SNAPSHOT') { changing = true }
implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true }
implementation 'org.slf4j:slf4j-simple:1.7.25'
// These dependencies are used for the workload-generator-commmon
implementation project(':workload-generator-commons')
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
...@@ -7,6 +7,13 @@ ext { ...@@ -7,6 +7,13 @@ ext {
scalaBinaryVersion = '2.12' scalaBinaryVersion = '2.12'
} }
repositories {
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies { dependencies {
// Special version required because of https://issues.apache.org/jira/browse/FLINK-13703 // Special version required because of https://issues.apache.org/jira/browse/FLINK-13703
implementation('org.industrial-devops:titan-ccp-common:0.1.0-flink-ready-SNAPSHOT') { changing = true } implementation('org.industrial-devops:titan-ccp-common:0.1.0-flink-ready-SNAPSHOT') { changing = true }
......
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-flink'
} }
mainClassName = "theodolite.uc1.application.HistoryServiceFlinkJob" mainClassName = "theodolite.uc1.application.HistoryServiceFlinkJob"
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-kafka-streams'
} }
mainClassName = "theodolite.uc1.application.HistoryService" mainClassName = "theodolite.uc1.application.HistoryService"
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-workload'
} }
mainClassName = "theodolite.uc1.workloadgenerator.LoadGenerator" mainClassName = "theodolite.uc1.workloadgenerator.LoadGenerator"
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-flink'
} }
allprojects { allprojects {
......
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-kafka-streams'
} }
mainClassName = "theodolite.uc2.application.HistoryService" mainClassName = "theodolite.uc2.application.HistoryService"
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-workload'
} }
mainClassName = "theodolite.uc2.workloadgenerator.LoadGenerator" mainClassName = "theodolite.uc2.workloadgenerator.LoadGenerator"
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-flink'
} }
allprojects { allprojects {
......
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-kafka-streams'
} }
mainClassName = "theodolite.uc3.application.HistoryService" mainClassName = "theodolite.uc3.application.HistoryService"
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-workload'
} }
mainClassName = "theodolite.uc3.workloadgenerator.LoadGenerator" mainClassName = "theodolite.uc3.workloadgenerator.LoadGenerator"
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-flink'
} }
mainClassName = "theodolite.uc4.application.AggregationServiceFlinkJob" mainClassName = "theodolite.uc4.application.AggregationServiceFlinkJob"
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-kafka-streams'
} }
mainClassName = "theodolite.uc4.application.AggregationService" mainClassName = "theodolite.uc4.application.AggregationService"
plugins { plugins {
id 'theodolite.java-uc' id 'theodolite.uc-workload'
} }
mainClassName = "theodolite.uc4.workloadgenerator.LoadGenerator" mainClassName = "theodolite.uc4.workloadgenerator.LoadGenerator"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment