You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by ni...@apache.org on 2016/03/24 19:16:33 UTC
samza git commit: SAMZA-907: allow conditional compilation on JDK8
source code in samza-sql-* modules
Repository: samza
Updated Branches:
refs/heads/samza-sql c6864d623 -> f29c61498
SAMZA-907: allow conditional compilation on JDK8 source code in samza-sql-* modules
Project: http://git-wip-us.apache.org/repos/asf/samza/repo
Commit: http://git-wip-us.apache.org/repos/asf/samza/commit/f29c6149
Tree: http://git-wip-us.apache.org/repos/asf/samza/tree/f29c6149
Diff: http://git-wip-us.apache.org/repos/asf/samza/diff/f29c6149
Branch: refs/heads/samza-sql
Commit: f29c61498d7db9360aab555bc71da065cf8f655c
Parents: c6864d6
Author: Yi Pan <ni...@gmail.com>
Authored: Thu Mar 24 11:16:08 2016 -0700
Committer: Yi Pan (Data Infrastructure) <ni...@gmail.com>
Committed: Thu Mar 24 11:16:08 2016 -0700
----------------------------------------------------------------------
build.gradle | 51 ++++++++++++++++++++++++++++-----------------------
settings.gradle | 11 ++++++++++-
2 files changed, 38 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/samza/blob/f29c6149/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 685b24d..8fe4c46 100644
--- a/build.gradle
+++ b/build.gradle
@@ -335,34 +335,39 @@ project(":samza-yarn_$scalaVersion") {
jar.dependsOn("lesscss")
}
-project(":samza-sql-core") {
- apply plugin: 'java'
-
- dependencies {
- compile project(':samza-api')
- compile project(":samza-core_$scalaVersion")
- compile project(":samza-kv_$scalaVersion")
- compile "commons-collections:commons-collections:$commonsCollectionVersion"
- compile "org.apache.avro:avro:$avroVersion"
- testCompile "junit:junit:$junitVersion"
- testCompile "org.mockito:mockito-all:$mockitoVersion"
+if (JavaVersion.current().isJava8Compatible()) {
+ project(":samza-sql-core") {
+ apply plugin: 'java'
+
+ sourceCompatibility = 1.8
+
+ dependencies {
+ compile project(':samza-api')
+ compile project(":samza-core_$scalaVersion")
+ compile "commons-collections:commons-collections:$commonsCollectionVersion"
+ compile "org.apache.avro:avro:$avroVersion"
+ testCompile "junit:junit:$junitVersion"
+ testCompile "org.mockito:mockito-all:$mockitoVersion"
+ }
}
-}
-project(":samza-sql-calcite") {
- apply plugin: 'java'
+ project(":samza-sql-calcite") {
+ apply plugin: 'java'
- repositories {
- maven {
- url "http://conjars.org/repo"
+ repositories {
+ maven {
+ url "http://conjars.org/repo"
+ }
}
- }
- dependencies {
- compile project(":samza-sql-core")
- compile "org.apache.calcite:calcite-core:$calciteVersion"
- testCompile "junit:junit:$junitVersion"
- testCompile "org.mockito:mockito-all:$mockitoVersion"
+ sourceCompatibility = 1.8
+
+ dependencies {
+ compile project(":samza-sql-core")
+ compile "org.apache.calcite:calcite-core:$calciteVersion"
+ testCompile "junit:junit:$junitVersion"
+ testCompile "org.mockito:mockito-all:$mockitoVersion"
+ }
}
}
http://git-wip-us.apache.org/repos/asf/samza/blob/f29c6149/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 4940562..f1903c6 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -20,9 +20,18 @@ include \
'samza-api',
'samza-elasticsearch',
'samza-log4j',
- 'samza-shell',
+ 'samza-shell'
+
+def jdk8Modules = [
'samza-sql-core',
'samza-sql-calcite'
+] as HashSet
+
+if (JavaVersion.current().isJava8Compatible()) {
+ jdk8Modules.each {
+ include it
+ }
+}
def scalaModules = [
'samza-core',