Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | import com.android.build.gradle.internal.coverage.JacocoPlugin |
| 18 | import com.android.build.gradle.internal.coverage.JacocoReportTask |
| 19 | import com.android.build.gradle.internal.tasks.DeviceProviderInstrumentTestTask |
| 20 | import com.google.common.base.Charsets |
| 21 | import com.google.common.io.Files |
Aurimas Liutikas | 9ab3b4c3 | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 22 | |
Aurimas Liutikas | a015004 | 2017-04-21 09:46:12 -0700 | [diff] [blame] | 23 | import org.gradle.api.logging.configuration.ShowStacktrace |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 24 | |
| 25 | def supportRoot = ext.supportRootFolder |
| 26 | if (supportRoot == null) { |
| 27 | throw new RuntimeException("variable supportRootFolder is not set. you must set it before" + |
| 28 | " including this script") |
| 29 | } |
| 30 | def init = new Properties() |
| 31 | ext.init = init |
Alan Viverette | 1b86237 | 2017-03-22 11:32:28 -0400 | [diff] [blame] | 32 | ext.init.debugKeystore = file("${supportRoot}/development/keystore/debug.keystore") |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 33 | |
Aurimas Liutikas | 9ab3b4c3 | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 34 | ext.runningInBuildServer = System.env.DIST_DIR != null && System.env.OUT_DIR != null |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 35 | |
| 36 | apply from: "${supportRoot}/buildSrc/dependencies.gradle" |
Alan Viverette | 5b3946f | 2017-04-27 09:59:22 -0400 | [diff] [blame] | 37 | ext.docs = [:] |
| 38 | ext.docs.offline = rootProject.getProperties().containsKey("offlineDocs") |
| 39 | ext.docs.dac = [ |
| 40 | libraryroot: "android/support", |
| 41 | dataname: "SUPPORT_DATA" |
| 42 | ] |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 43 | |
| 44 | def loadDefaultVersions() { |
| 45 | apply from: "${supportRootFolder}/buildSrc/versions.gradle" |
| 46 | } |
| 47 | |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 48 | def enableDoclavaAndJDiff(p) { |
| 49 | p.configurations { |
| 50 | doclava |
| 51 | jdiff |
| 52 | } |
| 53 | |
| 54 | p.dependencies { |
| 55 | doclava project(':doclava') |
| 56 | jdiff project(':jdiff') |
| 57 | jdiff libs.xml_parser_apis |
| 58 | jdiff libs.xerces_impl |
| 59 | } |
| 60 | apply from: "${ext.supportRootFolder}/buildSrc/diff_and_docs.gradle" |
| 61 | } |
| 62 | |
| 63 | def setSdkInLocalPropertiesFile() { |
Aurimas Liutikas | b06771d | 2017-04-20 09:46:49 -0700 | [diff] [blame] | 64 | final String osName = System.getProperty("os.name").toLowerCase(); |
| 65 | final boolean isMacOsX = |
| 66 | osName.contains("mac os x") || osName.contains("darwin") || osName.contains("osx"); |
| 67 | final String platform = isMacOsX ? 'darwin' : 'linux' |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 68 | System.setProperty('android.dir', "${supportRootFolder}/../../") |
Aurimas Liutikas | d2d9bda | 2017-03-03 16:06:39 -0800 | [diff] [blame] | 69 | ext.buildToolsVersion = '26.0.0' |
Aurimas Liutikas | 9ab3b4c3 | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 70 | final String fullSdkPath = "${repos.prebuiltsRoot}/fullsdk-${platform}" |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 71 | if (file(fullSdkPath).exists()) { |
| 72 | gradle.ext.currentSdk = 26 |
Alan Viverette | eb9f332 | 2017-03-09 16:29:57 -0500 | [diff] [blame] | 73 | project.ext.androidJar = |
| 74 | files("${fullSdkPath}/platforms/android-${gradle.currentSdk}/android.jar") |
| 75 | project.ext.androidSrcJar = |
| 76 | file("${fullSdkPath}/platforms/android-${gradle.currentSdk}/android-stubs-src.jar") |
Alan Viverette | 810a148 | 2017-03-20 12:43:43 -0400 | [diff] [blame] | 77 | project.ext.androidApiTxt = null |
Aurimas Liutikas | 9ab3b4c3 | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 78 | System.setProperty('android.home', "${repos.prebuiltsRoot}/fullsdk-${platform}") |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 79 | File props = file("local.properties") |
| 80 | props.write "sdk.dir=${fullSdkPath}" |
Aurimas Liutikas | 3c66600 | 2017-03-08 19:30:28 -0800 | [diff] [blame] | 81 | ext.usingFullSdk = true |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 82 | } else { |
| 83 | gradle.ext.currentSdk = 'current' |
Aurimas Liutikas | 9ab3b4c3 | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 84 | project.ext.androidJar = files("${repos.prebuiltsRoot}/sdk/current/android.jar") |
Alan Viverette | 810a148 | 2017-03-20 12:43:43 -0400 | [diff] [blame] | 85 | project.ext.androidSrcJar = null |
Aurimas Liutikas | 9ab3b4c3 | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 86 | project.ext.androidApiTxt = file("${repos.prebuiltsRoot}/sdk/api/26.txt") |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 87 | File props = file("local.properties") |
| 88 | props.write "android.dir=../../" |
Aurimas Liutikas | 3c66600 | 2017-03-08 19:30:28 -0800 | [diff] [blame] | 89 | ext.usingFullSdk = false |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 90 | } |
| 91 | } |
| 92 | |
| 93 | def setupRepoOutAndBuildNumber() { |
Yigit Boyar | ef30066 | 2017-05-01 11:52:07 -0700 | [diff] [blame^] | 94 | // common support repo folder which works well for prebuilts. |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 95 | ext.supportRepoOut = '' |
Yigit Boyar | ef30066 | 2017-05-01 11:52:07 -0700 | [diff] [blame^] | 96 | // files in artifactoryRepoOut can be safely copied into a real artifactory. |
| 97 | ext.artifactoryRepoOut = '' |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 98 | ext.buildNumber = Integer.toString(ext.extraVersion) |
| 99 | |
| 100 | /* |
| 101 | * With the build server you are given two env variables. |
| 102 | * The OUT_DIR is a temporary directory you can use to put things during the build. |
| 103 | * The DIST_DIR is where you want to save things from the build. |
| 104 | * |
| 105 | * The build server will copy the contents of DIST_DIR to somewhere and make it available. |
| 106 | */ |
Yigit Boyar | 7bfacb7 | 2017-03-02 14:27:41 -0800 | [diff] [blame] | 107 | if (ext.runningInBuildServer) { |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 108 | buildDir = new File(System.env.OUT_DIR + '/gradle/frameworks/support/build') |
| 109 | .getCanonicalFile() |
| 110 | project.ext.distDir = new File(System.env.DIST_DIR).getCanonicalFile() |
| 111 | |
| 112 | // the build server does not pass the build number so we infer it from the last folder of |
| 113 | // the dist path. |
| 114 | ext.buildNumber = project.ext.distDir.getName() |
Aurimas Liutikas | a015004 | 2017-04-21 09:46:12 -0700 | [diff] [blame] | 115 | |
| 116 | // the build server should always print out full stack traces for any failures. |
| 117 | gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 118 | } else { |
| 119 | buildDir = file("${ext.supportRootFolder}/../../out/host/gradle/frameworks/support/build") |
| 120 | project.ext.distDir = new File("${ext.supportRootFolder}/../../out/dist") |
| 121 | } |
| 122 | subprojects { |
| 123 | // Change buildDir first so that all plugins pick up the new value. |
| 124 | project.buildDir = new File("$project.parent.buildDir/../$project.name/build") |
| 125 | } |
| 126 | ext.supportRepoOut = new File(buildDir, 'support_repo') |
Yigit Boyar | ef30066 | 2017-05-01 11:52:07 -0700 | [diff] [blame^] | 127 | ext.artifactoryRepoOut = new File(buildDir, 'artifactory_repo') |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 128 | ext.testApkDistOut = ext.distDir |
Yigit Boyar | 7bfacb7 | 2017-03-02 14:27:41 -0800 | [diff] [blame] | 129 | ext.testResultsDistDir = new File(distDir, "host-test-reports") |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 130 | ext.docsDir = new File(buildDir, 'javadoc') |
| 131 | } |
| 132 | |
| 133 | def configureSubProjects() { |
| 134 | // lint every library |
| 135 | def lintTask = project.tasks.create("lint") |
| 136 | subprojects { |
| 137 | // Only modify Android projects. |
Yigit Boyar | 7bfacb7 | 2017-03-02 14:27:41 -0800 | [diff] [blame] | 138 | if (project.name.equals('doclava') || project.name.equals('jdiff')) { |
| 139 | // disable tests and return |
| 140 | project.tasks.whenTaskAdded { task -> |
| 141 | if (task instanceof org.gradle.api.tasks.testing.Test) { |
| 142 | task.enabled = false |
| 143 | } |
| 144 | } |
| 145 | return |
| 146 | } |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 147 | |
| 148 | // Current SDK is set in studioCompat.gradle. |
| 149 | project.ext.currentSdk = gradle.ext.currentSdk |
| 150 | apply plugin: 'maven' |
| 151 | |
| 152 | version = rootProject.ext.supportVersion |
| 153 | group = 'com.android.support' |
| 154 | |
Aurimas Liutikas | 9ab3b4c3 | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 155 | repos.addMavenRepositories(repositories) |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 156 | project.plugins.whenPluginAdded { plugin -> |
| 157 | def isAndroidLibrary = "com.android.build.gradle.LibraryPlugin" |
| 158 | .equals(plugin.class.name) |
| 159 | def isAndroidApp = "com.android.build.gradle.AppPlugin".equals(plugin.class.name) |
| 160 | def isJavaLibrary = "org.gradle.api.plugins.JavaPlugin".equals(plugin.class.name) |
| 161 | |
| 162 | if (isAndroidLibrary || isAndroidApp) { |
| 163 | project.android.buildToolsVersion = rootProject.buildToolsVersion |
| 164 | |
| 165 | // Enable code coverage for debug builds only if we are not running inside the IDE, |
| 166 | // since enabling coverage reports breaks the method parameter resolution in the IDE |
| 167 | // debugger. |
| 168 | project.android.buildTypes.debug.testCoverageEnabled = |
Sergey Vasilinets | ac8e72b | 2017-04-26 15:55:17 -0700 | [diff] [blame] | 169 | !project.hasProperty('android.injected.invoked.from.ide') |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 170 | |
| 171 | // Copy the class files in a jar to be later used to generate code coverage report |
| 172 | project.android.testVariants.all { v -> |
| 173 | // check if the variant has any source files |
| 174 | // and test coverage is enabled |
| 175 | if (v.buildType.testCoverageEnabled |
| 176 | && v.sourceSets.any { !it.java.sourceFiles.isEmpty() }) { |
| 177 | def jarifyTask = project.tasks.create( |
| 178 | name: "package${v.name.capitalize()}ClassFilesForCoverageReport", |
| 179 | type: Jar) { |
| 180 | from v.testedVariant.javaCompile.destinationDir |
| 181 | exclude "**/R.class" |
| 182 | exclude "**/R\$*.class" |
| 183 | exclude "**/BuildConfig.class" |
| 184 | destinationDir file(project.distDir) |
| 185 | archiveName "${project.archivesBaseName}-${v.baseName}-allclasses.jar" |
| 186 | } |
| 187 | def jacocoAntConfig = |
| 188 | project.configurations[JacocoPlugin.ANT_CONFIGURATION_NAME] |
| 189 | def jacocoAntArtifacts = jacocoAntConfig.resolvedConfiguration |
| 190 | .resolvedArtifacts |
| 191 | def version = jacocoAntArtifacts.find { "org.jacoco.ant".equals(it.name) } |
| 192 | .moduleVersion.id.version |
| 193 | def collectJacocoAntPackages = project.tasks.create( |
| 194 | name: "collectJacocoAntPackages", |
| 195 | type: Jar) { |
| 196 | from(jacocoAntArtifacts.collect { zipTree(it.getFile()) }) { |
| 197 | // exclude all the signatures the jar might have |
| 198 | exclude "META-INF/*.SF" |
| 199 | exclude "META-INF/*.DSA" |
| 200 | exclude "META-INF/*.RSA" |
| 201 | } |
| 202 | destinationDir file(project.distDir) |
| 203 | archiveName "jacocoant-" + version + ".jar" |
| 204 | } |
| 205 | jarifyTask.dependsOn v.getJavaCompiler() |
| 206 | v.assemble.dependsOn jarifyTask, collectJacocoAntPackages |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | // Enforce NewApi lint check as fatal. |
| 211 | project.android.lintOptions.check 'NewApi' |
| 212 | project.android.lintOptions.fatal 'NewApi' |
| 213 | lintTask.dependsOn project.lint |
| 214 | } |
| 215 | |
| 216 | if (isAndroidLibrary || isJavaLibrary) { |
| 217 | // Add library to the aggregate dependency report. |
| 218 | task allDeps(type: DependencyReportTask) {} |
Yigit Boyar | ef30066 | 2017-05-01 11:52:07 -0700 | [diff] [blame^] | 219 | // create a release task that produces artifactory friends artifacts |
| 220 | // a.k.a. unique versions for snapshots with their maven-metadata files. |
| 221 | task artifactoryRelease(type : Upload) { |
| 222 | configuration = configurations.archives |
| 223 | repositories { |
| 224 | mavenDeployer { |
| 225 | repository(url: uri("$rootProject.ext.artifactoryRepoOut")) |
| 226 | setUniqueVersion(true) |
| 227 | } |
| 228 | } |
| 229 | } |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 230 | // Create release and separate zip task for library. |
| 231 | task release(type: Upload) { |
| 232 | configuration = configurations.archives |
| 233 | repositories { |
| 234 | mavenDeployer { |
| 235 | repository(url: uri("$rootProject.ext.supportRepoOut")) |
| 236 | |
| 237 | // Disable unique names for SNAPSHOTS so they can be updated in place. |
| 238 | setUniqueVersion(false) |
| 239 | doLast { |
| 240 | // Remove any invalid maven-metadata.xml files that may have been |
| 241 | // created for SNAPSHOT versions that are *not* uniquely versioned. |
| 242 | pom*.each { pom -> |
| 243 | if (pom.version.endsWith('-SNAPSHOT')) { |
| 244 | final File artifactDir = new File( |
| 245 | rootProject.ext.supportRepoOut, |
| 246 | pom.groupId.replace('.', '/') |
| 247 | + '/' + pom.artifactId |
| 248 | + '/' + pom.version) |
| 249 | delete fileTree(dir: artifactDir, |
| 250 | include: 'maven-metadata.xml*') |
| 251 | } |
| 252 | } |
| 253 | } |
| 254 | } |
| 255 | } |
| 256 | } |
Yigit Boyar | ef30066 | 2017-05-01 11:52:07 -0700 | [diff] [blame^] | 257 | artifactoryRelease.dependsOn release |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 258 | |
| 259 | def deployer = release.repositories.mavenDeployer |
| 260 | deployer.pom*.whenConfigured { pom -> |
| 261 | pom.dependencies.findAll { dep -> |
| 262 | dep.groupId == 'com.android.support' && |
| 263 | dep.artifactId != 'support-annotations' |
| 264 | }*.type = 'aar' |
| 265 | } |
| 266 | |
| 267 | ext.versionDir = { |
| 268 | def groupDir = new File(rootProject.ext.supportRepoOut, |
| 269 | project.group.replace('.', '/')) |
| 270 | def artifactDir = new File(groupDir, archivesBaseName) |
| 271 | return new File(artifactDir, version) |
| 272 | } |
| 273 | |
| 274 | task generateSourceProps(dependsOn: createRepository) |
| 275 | generateSourceProps.doLast({ |
| 276 | def content = "Maven.GroupId=$deployer.pom.groupId\n" + |
| 277 | "Maven.ArtifactId=$deployer.pom.artifactId\n" + |
| 278 | "Maven.Version=$deployer.pom.version\n" + |
| 279 | "Extra.VendorDisplay=Android\n" + |
| 280 | "Extra.VendorId=android\n" + |
| 281 | "Pkg.Desc=$project.name\n" + |
| 282 | "Pkg.Revision=1\n" + |
| 283 | "Maven.Dependencies=" + |
| 284 | String.join(",", project.configurations.compile.allDependencies |
| 285 | .collect { |
| 286 | def p = parent.findProject(it.name) |
| 287 | return p ? "$p.group:$p.archivesBaseName:$p.version" : null |
| 288 | }.grep()) + |
| 289 | "\n" |
| 290 | Files.write(content, new File(versionDir(), 'source.properties'), |
| 291 | Charsets.UTF_8) |
| 292 | }) |
| 293 | |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 294 | // Before the upload, make sure the repo is ready. |
| 295 | release.dependsOn rootProject.tasks.prepareRepo |
| 296 | |
| 297 | // Make the mainupload depend on this one. |
| 298 | mainUpload.dependsOn release |
Yigit Boyar | ef30066 | 2017-05-01 11:52:07 -0700 | [diff] [blame^] | 299 | mainUpload.dependsOn artifactoryRelease |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 300 | } |
| 301 | } |
| 302 | |
Yigit Boyar | 7bfacb7 | 2017-03-02 14:27:41 -0800 | [diff] [blame] | 303 | // Copy instrumentation test APKs and app APKs into the dist dir |
| 304 | // For test apks, they are uploaded only if we have java test sources. |
| 305 | // For regular app apks, they are uploaded only if they have java sources. |
| 306 | project.tasks.whenTaskAdded { task -> |
| 307 | if (task.name.startsWith("packageDebug")) { |
| 308 | def testApk = task.name.contains("AndroidTest") |
| 309 | task.doLast { |
| 310 | def source = testApk ? project.android.sourceSets.androidTest |
| 311 | : project.android.sourceSets.main |
| 312 | if (task.hasProperty("outputFile") && !source.java.sourceFiles.isEmpty()) { |
| 313 | copy { |
| 314 | from(task.outputFile) |
| 315 | into(rootProject.ext.testApkDistOut) |
| 316 | rename { String fileName -> |
| 317 | // multiple modules may have the same name so prefix the name with |
| 318 | // the module's path to ensure it is unique. |
| 319 | // e.g. palette-v7-debug-androidTest.apk becomes |
| 320 | // support-palette-v7_palette-v7-debug-androidTest.apk |
| 321 | "${project.getPath().replace(':', '-').substring(1)}_${fileName}" |
| 322 | } |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | // copy host side test results to DIST |
| 330 | project.tasks.whenTaskAdded { task -> |
| 331 | if (task instanceof org.gradle.api.tasks.testing.Test) { |
| 332 | def junitReport = task.reports.junitXml |
| 333 | if (junitReport.enabled) { |
| 334 | def zipTask = project.tasks.create(name : "zipResultsOf${task.name.capitalize()}", type : Zip) { |
| 335 | destinationDir(testResultsDistDir) |
Yigit Boyar | 278676d | 2017-03-10 15:29:11 -0800 | [diff] [blame] | 336 | // first one is always :, drop it. |
| 337 | archiveName("${project.getPath().split(":").join("_").substring(1)}.zip") |
Yigit Boyar | 7bfacb7 | 2017-03-02 14:27:41 -0800 | [diff] [blame] | 338 | } |
| 339 | if (project.rootProject.ext.runningInBuildServer) { |
| 340 | task.ignoreFailures = true |
| 341 | } |
| 342 | task.finalizedBy zipTask |
| 343 | task.doFirst { |
| 344 | zipTask.from(junitReport.destination) |
| 345 | } |
| 346 | } |
| 347 | } |
| 348 | } |
| 349 | |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 350 | project.afterEvaluate { |
| 351 | // The archivesBaseName isn't available initially, so set it now |
| 352 | def createZipTask = project.tasks.findByName("createSeparateZip") |
| 353 | if (createZipTask != null) { |
| 354 | createZipTask.appendix = archivesBaseName |
| 355 | createZipTask.from versionDir() |
| 356 | } |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 357 | } |
| 358 | |
| 359 | project.afterEvaluate { p -> |
| 360 | // remove dependency on the test so that we still get coverage even if some tests fail |
| 361 | p.tasks.findAll { it instanceof JacocoReportTask }.each { task -> |
| 362 | def toBeRemoved = new ArrayList() |
| 363 | def dependencyList = task.taskDependencies.values |
| 364 | dependencyList.each { dep -> |
| 365 | if (dep instanceof String) { |
| 366 | def t = tasks.findByName(dep) |
| 367 | if (t instanceof DeviceProviderInstrumentTestTask) { |
| 368 | toBeRemoved.add(dep) |
| 369 | task.mustRunAfter(t) |
| 370 | } |
| 371 | } |
| 372 | } |
| 373 | toBeRemoved.each { dep -> |
| 374 | dependencyList.remove(dep) |
| 375 | } |
| 376 | } |
| 377 | } |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | def setupRelease() { |
| 382 | apply from: "${ext.supportRootFolder}/buildSrc/release.gradle" |
| 383 | } |
| 384 | |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 385 | ext.init.enableDoclavaAndJDiff = this.&enableDoclavaAndJDiff |
| 386 | ext.init.setSdkInLocalPropertiesFile = this.&setSdkInLocalPropertiesFile |
| 387 | ext.init.setupRepoOutAndBuildNumber = this.&setupRepoOutAndBuildNumber |
| 388 | ext.init.setupRelease = this.&setupRelease |
| 389 | ext.init.loadDefaultVersions = this.&loadDefaultVersions |
| 390 | ext.init.configureSubProjects = this.&configureSubProjects |