diff --git a/remote.gradle b/remote.gradle index f3da1cf..0babb92 100644 --- a/remote.gradle +++ b/remote.gradle @@ -7,8 +7,7 @@ * * This Gradle script handles dispatching various ODK Project buildscripts to where the common * logic is stored. -*/ - +*/ // Remote Paths def jacocoURL = 'https://raw.githubusercontent.com/opendatakit/gradle-config/' + gradle.ext.gradleConfigVersion + '/jacoco.gradle' diff --git a/runnables.gradle b/runnables.gradle index a4a9635..a41a62a 100644 --- a/runnables.gradle +++ b/runnables.gradle @@ -10,98 +10,11 @@ * * @TODO: Convert to custom Gradle plugin */ - -/************************************************************************************************** - METHODS - *************************************************************************************************/ - -// Check which test types (unit-test, androidtest) have been implemented -def listTests() { - - def availiableTests = [] - def testFolder = new File("${buildDir.parent}/src/test") - def androidTestFolder = new File("${buildDir.parent}/src/androidTest") - - // Check unit-test location exists - if (testFolder.exists()) { - availiableTests.add("testDebugUnitTest") - } - - // Check androidtest location exists - if (androidTestFolder.exists()) { - availiableTests.add("connectedDebugAndroidTest") - } - - // Return a list of test types that have been implemented - return availiableTests - } - - // List locations of available generated JaCoCo files - def listTestFiles() { - - description = "Merge code coverage files from all available test types" - - def testFiles = []; - def testFolder = new File("${buildDir.parent}/src/test") - def androidTestFolder = new File("${buildDir.parent}/src/androidTest") - - // Check unit-test location exists - if (testFolder.exists()) { - testFiles.add("${buildDir}/jacoco/testDebugUnitTest.exec") - } - - // Check androidtest location exists - if (androidTestFolder.exists()) { - testFiles.add("${buildDir}/outputs/code-coverage/connected/coverage.ec") - } - - // Return list of file locations - return testFiles; - } /************************************************************************************************** TASKS *************************************************************************************************/ -// produces a composite code coverage report (vs. Android Studio's androidTest-only coverage) -task jacocoCoverageReport(type: JacocoReport) { - - // combine the unit test and android test coverage files - executionData = files(listTestFiles()) - // Include only relevant .class files - classDirectories = fileTree( - dir: "${buildDir}/intermediates/classes/debug", - excludes: ['**/R.class' - , '**/R$*.class' - , '**/BuildConfig.*' - , '**/*$ViewInjector*.*' - , '**/Manifest*.*' - , '**/*_*' // generated by androidannotaions - , '**/*InjectAdapter.class', '**/*ModuleAdapter*.class' // generated by dagger - , '**/database/provider/*' // generated database handling - ] - ) - - sourceDirectories = files("${buildDir.parent}/src/main/java") // Set src directories - - additionalSourceDirs = files([ - "${buildDir}/generated/source/buildConfig/debug", - "${buildDir}/generated/source/r/debug" - ]) - - // Set report output configuration - reports { - xml { - enabled = true - destination "${project.buildDir}/reports/jacoco/jacoco.xml" - } - html { - enabled = true - destination "${project.buildDir}/reports/jacoco" - } - } - -} // Define the snapshot version to be the git hash task generateSnapshotVersion { diff --git a/variables.gradle b/variables.gradle index e4887db..d714e70 100644 --- a/variables.gradle +++ b/variables.gradle @@ -26,12 +26,12 @@ ext.versionCodeName = '2.0.2 rev ' + ext.releaseVersionCode + ext.inProgressVers ext.masterArtifactVersion = 'rev216' // SDK versions -ext.compileVersion = 26 +ext.compileVersion = 27 ext.minVersion = 17 ext.targetVersion = 23 // Build tools -ext.buildTools = "27.0.1" +ext.buildTools = "27.0.2" // Java version ext.javaVersion = JavaVersion.VERSION_1_7 @@ -78,8 +78,6 @@ ext.masterDebug = gradle.ext.flavorMasterPrefix + gradle.ext.typeDebugSuffix ext.snapshotRelease = gradle.ext.flavorSnapshotPrefix + gradle.ext.typeReleaseSuffix ext.snapshotDebug = gradle.ext.flavorSnapshotPrefix + gradle.ext.typeDebugSuffix -ext.uitestRelease = gradle.ext.flavorUITestPrefix + gradle.ext.typeReleaseSuffix -ext.uitestDebug = gradle.ext.flavorUITestPrefix + gradle.ext.typeDebugSuffix /************************************************************************************************** TEST @@ -104,6 +102,9 @@ ext.uitestMinSDK = 18 // Path from top-level Gradle script to local version of AndroidLibrary ext.libraryProjectPath = new File(gradle.ext.workspacePath + "/androidlibrary/androidlibrary_lib") +// Path for subproject directory +ext.librarySubProjectDictory = new File('androidlibrary') + // Root project name ext.libraryProjectRoot = ':androidlibrary' @@ -128,6 +129,9 @@ ext.librarySnapshotArtifactName = gradle.ext.flavorSnapshotPrefix + gradle.ext.l // Path from top-level Gradle script to local version of AndroidCommon ext.commonProjectPath = new File(gradle.ext.workspacePath + "/androidcommon/androidcommon_lib") +// Path for subproject directory +ext.commonSubProjectDictory = new File('androidcommon') + // Root project name ext.commonProjectRoot = ':androidcommon' @@ -152,6 +156,9 @@ ext.commonSnapshotArtifactName = gradle.ext.flavorSnapshotPrefix + gradle.ext.co // Path from top-level Gradle script to local version of SensorsInterface ext.sensorsInterfaceProjectPath = new File(gradle.ext.workspacePath + "/sensorsinterface/sensorsinterface_lib") +// Path for subproject directory +ext.sensorsInterfaceSubProjectDictory = new File('sensorsinterface') + // Root project name ext.sensorsInterfaceProjectRoot = ':sensorsinterface' @@ -204,8 +211,3 @@ ext.tablesName = '.tables' ext.sensorsFrameworkProjectChild = ':sensorsframework_app' ext.sensorsFrameworkName = '.sensors' - -/* -- Collect-- */ - -ext.collectProjectChild = ':collect_app' -ext.collectName = '.collect'