build.gradle revision d437f7eeb199ed9bf9fb9bed664258dbbcd87130
1/*
2 * Copyright (C) 2015 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 */
16ext.dataBindingRootFolder = new File(project.projectDir, "..")
17buildscript {
18    ext.dataBindingRootFolder = new File(project.projectDir, "..")
19    apply from: "${project.projectDir}/../propLoader.gradle"
20    apply from: "${project.projectDir}/../supportBundle.gradle"
21    ext.addRepos(repositories)
22}
23
24def bundleSupportLibTask = tasks['bundleSupportLib']
25
26subprojects {
27    apply plugin: 'maven'
28    group = dataBindingConfig.group
29    version = dataBindingConfig.extensionsVersion
30    uploadArchives {
31        repositories {
32            mavenDeployer {
33                repository(url: "file://${dataBindingConfig.internalPrebuiltsRepoDir}")
34            }
35        }
36    }
37    bundleSupportLibTask.dependsOn tasks['uploadArchives']
38
39    def configureOut = tasks.create(name: 'configureOut') << {
40        println("configuring out...")
41        def deployer = tasks['uploadArchives'].repositories.mavenDeployer.repository
42        println "changing ${deployer.url} to ${rootProject.ext.supportRepoOut}"
43        deployer.url = "file://${rootProject.ext.supportRepoOut}"
44    }
45    bundleSupportLibTask.dependsOn configureOut
46    tasks['uploadArchives'].mustRunAfter configureOut
47    tasks['uploadArchives'].mustRunAfter unzipRepo
48}
49
50
51task preparePrebuilds() {
52}
53
54allprojects {
55    afterEvaluate { project ->
56        preparePrebuilds.dependsOn project.tasks.findAll {task -> task.name.startsWith('prebuild')}
57    }
58}