blob: 2dbcae332ea1d4d957f0f81f6654dea8c523bc4e [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"]
Aurimas9dc5a162023-02-16 05:26:48 +000028 if (metalavaBuildId == null) {
29 throw new GradleException("metalava build id must be defined.")
Yigit Boyara755f332020-05-30 19:14:46 -070030 }
31 def metalavaRepo = "https://androidx.dev/metalava/builds/${metalavaBuildId}/artifacts/repo/m2repository"
Yigit Boyara755f332020-05-30 19:14:46 -070032 repositories {
33 google()
34 mavenCentral()
Yigit Boyara755f332020-05-30 19:14:46 -070035 maven {
36 url metalavaRepo
37 metadataSources {
38 mavenPom()
39 artifact()
40 }
41 }
Aurimasc36b1d32022-04-22 23:16:35 +000042 gradlePluginPortal().content {
Aurimas Liutikas2e6b1a22024-09-11 10:01:11 -070043 it.includeModule("com.gradleup.shadow", "shadow-gradle-plugin")
Aurimasc36b1d32022-04-22 23:16:35 +000044 it.includeModule("me.champeau.gradle", "japicmp-gradle-plugin")
45 }
Yigit Boyara755f332020-05-30 19:14:46 -070046 }
Yigit Boyara755f332020-05-30 19:14:46 -070047 ext.repos = [:]
Yigit Boyara755f332020-05-30 19:14:46 -070048}
Yigit Boyara755f332020-05-30 19:14:46 -070049
Yigit Boyara755f332020-05-30 19:14:46 -070050apply plugin: AndroidXRootPlugin
51apply plugin: AndroidXPlaygroundRootPlugin