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 ext.supportRootFolder = new File("../../../..") 18 apply from: "$supportRootFolder/buildSrc/repos.gradle" 19 repos.addMavenRepositories(repositories) 20 21 ext.runningInBuildServer = System.env.DIST_DIR != null && System.env.OUT_DIR != null 22 ext.repoDir = runningInBuildServer ? new File(System.env.OUT_DIR + '/gradle/frameworks/support/build') : 23 new File("$supportRootFolder/../../out/host/gradle/frameworks/support/build") 24 25 task createArchive(type: Exec) { 26 inputs.files(fileTree(dir: "$supportRootFolder/navigation", 27 includes: ['**/*.java', '**/*.kt'], exclude: 'integration-tests/*')) 28 outputs.dir(repoDir) 29 workingDir "$supportRootFolder/app-toolkit/" 30 commandLine "./gradlew", "createArchive" 31 } 32 33 task unzip(type: Copy, dependsOn: createArchive) { 34 from "$repoDir/support_repo" 35 into "../build/localMaven/" 36 } 37 38 apply plugin: 'java' 39 dependencies { 40 compile project(":moar-buildSrc") 41 } 42 43 tasks["build"].dependsOn unzip