[go: nahoru, domu]

blob: 3184ca7d5736af989af36dcb6af49f79c697b144 [file] [log] [blame]
Yigit Boyara755f332020-05-30 19:14:46 -07001/*
2 * Copyright 2020 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
17import androidx.build.AndroidXPlaygroundRootPlugin
18import androidx.build.AndroidXRootPlugin
19
20// A generic build.gradle file for all playground projects that sets it up to use public artifacts.
21// See README.md for details
22
23buildscript {
24 def playgroundCommonFolder = rootProject.buildFile.parentFile
25 ext.supportRootFolder = playgroundCommonFolder.parentFile
26
27 def metalavaBuildId = rootProject.properties["androidx.playground.metalavaBuildId"]
28 def dokkaBuildId = rootProject.properties["androidx.playground.dokkaBuildId"]
29 if (metalavaBuildId == null || dokkaBuildId == null) {
30 throw new GradleException("metalava and or dokka build ids must be defined.")
31 }
32 def metalavaRepo = "https://androidx.dev/metalava/builds/${metalavaBuildId}/artifacts/repo/m2repository"
33 def dokkaRepo = "https://androidx.dev/dokka/builds/${dokkaBuildId}/artifacts/repository"
34 repositories {
35 google()
36 mavenCentral()
Yigit Boyara755f332020-05-30 19:14:46 -070037 maven {
38 url metalavaRepo
39 metadataSources {
40 mavenPom()
41 artifact()
42 }
43 }
44 maven {
45 url dokkaRepo
46 metadataSources {
47 mavenPom()
48 artifact()
49 }
50 }
Aurimasc36b1d32022-04-22 23:16:35 +000051 gradlePluginPortal().content {
52 it.includeModule("gradle.plugin.com.github.johnrengelman", "shadow")
53 it.includeModule("me.champeau.gradle", "japicmp-gradle-plugin")
54 }
Yigit Boyara755f332020-05-30 19:14:46 -070055 }
56
57 ext.repos = [:]
Yigit Boyara755f332020-05-30 19:14:46 -070058}
Yigit Boyara755f332020-05-30 19:14:46 -070059
Dustin Lamc93a99d2020-12-31 00:08:18 +000060apply from: "$supportRootFolder/buildSrc/dependencies.gradle"
Jeff Gaston5633a812021-08-13 11:34:58 -040061apply from: "$supportRootFolder/buildSrc/out.gradle"
Yigit Boyara755f332020-05-30 19:14:46 -070062init.chooseOutDir("/${rootProject.name}")
63
64apply plugin: AndroidXRootPlugin
65apply plugin: AndroidXPlaygroundRootPlugin