From 122d1c0b27c0f5e4532f7a23ce016a5c5756321a Mon Sep 17 00:00:00 2001 From: Szabolcs Vasas Date: Mon, 3 Dec 2018 11:44:31 +0100 Subject: [PATCH] SQOOP-3415: Fix gradle test+build when clean applied as the first command + warning issue fixes (Attila Szabo via Szabolcs Vasas) This closes #62 --- build.gradle | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index f0beec99..47d4136c 100644 --- a/build.gradle +++ b/build.gradle @@ -84,6 +84,16 @@ configurations { compileJava.dependsOn(SqoopVersionFileGen) +compileJava { + options.compilerArgs += '-proc:none' + options.compilerArgs += '-Xlint:all' +} + +compileTestJava { + options.compilerArgs += '-proc:none' + options.compilerArgs += '-Xlint:all' +} + configurations.all { resolutionStrategy { force group: 'org.apache.avro', name: 'avro', version: avroVersion @@ -320,16 +330,16 @@ task allTest (type: Test){ def testBuildDir = "$buildDir/test/" def testBuildDirData ="$testBuildDir/data/" -task buildFolder { - project.mkdir(testBuildDirData) -} - tasks.withType(Test) { + doFirst { + project.mkdir(testBuildDir) + project.mkdir(testBuildDirData) + } + testLogging { events 'passed', 'skipped' } workingDir = testBuildDirData - project.mkdir(workingDir) systemProperties(System.getProperties()) systemProperty "test.data.dir", "$projectDir/testdata" systemProperty 'test.build.data', "$testBuildDir/data" @@ -346,8 +356,6 @@ tasks.withType(Test) { maxHeapSize = "8G" jvmArgs "-da:org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge" - dependsOn buildFolder - jacoco{ excludes = ["**/SqoopVersion*"] }