xref: /aosp_15_r20/developers/build/prebuilts/gradle/DarkTheme/Application/build.gradle (revision d353a188ca6ec4b5eba25b5fbd7bcb8ce61322fb)
1*d353a188SXin Li/*
2*d353a188SXin Li * Copyright (C) 2019 The Android Open Source Project
3*d353a188SXin Li *
4*d353a188SXin Li * Licensed under the Apache License, Version 2.0 (the "License");
5*d353a188SXin Li * you may not use this file except in compliance with the License.
6*d353a188SXin Li * You may obtain a copy of the License at
7*d353a188SXin Li *
8*d353a188SXin Li *      https://www.apache.org/licenses/LICENSE-2.0
9*d353a188SXin Li *
10*d353a188SXin Li * Unless required by applicable law or agreed to in writing, software
11*d353a188SXin Li * distributed under the License is distributed on an "AS IS" BASIS,
12*d353a188SXin Li * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*d353a188SXin Li * See the License for the specific language governing permissions and
14*d353a188SXin Li * limitations under the License.
15*d353a188SXin Li */
16*d353a188SXin Li
17*d353a188SXin Libuildscript {
18*d353a188SXin Li    repositories {
19*d353a188SXin Li        google()
20*d353a188SXin Li        jcenter()
21*d353a188SXin Li    }
22*d353a188SXin Li
23*d353a188SXin Li    dependencies {
24*d353a188SXin Li        classpath 'com.android.tools.build:gradle:3.3.2'
25*d353a188SXin Li    }
26*d353a188SXin Li}
27*d353a188SXin Li
28*d353a188SXin Liapply plugin: 'com.android.application'
29*d353a188SXin Li
30*d353a188SXin Lirepositories {
31*d353a188SXin Li    google()
32*d353a188SXin Li    jcenter()
33*d353a188SXin Li}
34*d353a188SXin Li
35*d353a188SXin Lidependencies {
36*d353a188SXin Li    implementation 'com.google.android.material:material:1.1.0-alpha08'
37*d353a188SXin Li    implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
38*d353a188SXin Li    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
39*d353a188SXin Li    implementation 'androidx.preference:preference:1.1.0-rc01'
40*d353a188SXin Li}
41*d353a188SXin Li
42*d353a188SXin Li// The sample build uses multiple directories to
43*d353a188SXin Li// keep boilerplate and common code separate from
44*d353a188SXin Li// the main sample code.
45*d353a188SXin LiList<String> dirs = [
46*d353a188SXin Li    'main',     // main sample code; look here for the interesting stuff.
47*d353a188SXin Li    'common',   // components that are reused by multiple samples
48*d353a188SXin Li    'template'] // boilerplate code that is generated by the sample template process
49*d353a188SXin Li
50*d353a188SXin Liandroid {
51*d353a188SXin Li    compileSdkVersion 29
52*d353a188SXin Li
53*d353a188SXin Li    defaultConfig {
54*d353a188SXin Li        minSdkVersion 14
55*d353a188SXin Li        targetSdkVersion 29
56*d353a188SXin Li        vectorDrawables.useSupportLibrary true
57*d353a188SXin Li    }
58*d353a188SXin Li
59*d353a188SXin Li    compileOptions {
60*d353a188SXin Li        sourceCompatibility 1.8
61*d353a188SXin Li        targetCompatibility 1.8
62*d353a188SXin Li    }
63*d353a188SXin Li
64*d353a188SXin Li    sourceSets {
65*d353a188SXin Li        main {
66*d353a188SXin Li            dirs.each { dir ->
67*d353a188SXin Li                java.srcDirs "src/${dir}/java"
68*d353a188SXin Li                res.srcDirs "src/${dir}/res"
69*d353a188SXin Li            }
70*d353a188SXin Li        }
71*d353a188SXin Li        androidTest.setRoot('tests')
72*d353a188SXin Li        androidTest.java.srcDirs = ['tests/src']
73*d353a188SXin Li
74*d353a188SXin Li    }
75*d353a188SXin Li
76*d353a188SXin Li}
77