1/* 2 * Copyright (C) 2022 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 17repositories { 18 google() 19 mavenCentral() 20} 21 22buildscript { 23 repositories { 24 mavenCentral() 25 google() 26 } 27 dependencies { 28 classpath 'com.android.tools.build:gradle:7.2.2' 29 } 30} 31apply plugin: 'com.android.application' 32 33android { 34 compileSdkVersion 33 35 defaultConfig { 36 targetSdkVersion 33 37 minSdkVersion 31 38 39 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 40 } 41 sourceSets { 42 main { 43 manifest.srcFile 'AndroidManifest.xml' 44 java.srcDirs = [ 45 'java', 46 '../service-core/java', 47 '../service/java', 48 '../framework/java', 49 '../../../../../external/guava/guava/src', 50 '../../../../../frameworks/base/packages/SettingsLib/' + 51 'ActionBarShadow/src', 52 '../../../../../frameworks/base/core/java', 53 '../../../../../frameworks/base/packages/SettingsLib/' + 54 'CollapsingToolbarBaseActivity/src', 55 '../../../../../frameworks/base/packages/SettingsLib/' + 56 'MainSwitchPreference/src', 57 '../../../../../out/soong/.intermediates/packages/modules/AdServices/adservices/service-core/statslog-adservices-java-gen/gen', 58 '../../../../../external/dexmaker/dexmaker-mockito-inline-extended/src/main/java', 59 '../../../../../external/mockito/src/main/java', 60 '../../../../../external/mobile-data-download/java', 61 ] 62 java.setIncludes(new HashSet([ 63 'com/android/adservices/ui/**/*.java', 64 'com/android/adservices/**/*.java', 65 'com/android/settingslib/widget/**/*.java', 66 'com/google/common/collect/*.java', 67 'android/os/*.java', 68 'com/android/settingslib/collapsingtoolbar/**/*.java', 69 'com/android/adservices/service/stats/*.java', 70 'com/android/dx/mockito/**/*.java', 71 'org/mockito/**/*.java', 72 'com/google/android/libraries/mobiledatadownload/**/*.java', 73 ])) 74 res.srcDirs = [ 75 'res', 76 '../../../../../frameworks/base/packages/SettingsLib/' + 77 'SettingsTheme/res', 78 ] 79 resources.setIncludes(new HashSet([ 80 'drawable/*', 81 'drawable24/*', 82 'layout/*', 83 'mipmap-*/*', 84 'values/*', 85 'xml/*', 86 ])) 87 } 88 89 androidTest { 90 java.srcDirs = [ 91 'tests/src', 92 'unittest/src', 93 'tests/notification/src', 94 'tests/settings/src', 95 'tests/settingsgaota/src', 96 'tests/util/java', 97 ] 98 java.setIncludes(new HashSet([ 99 'com/android/adservices/ui/**/*.java', 100 ])) 101 } 102 } 103 buildToolsVersion '30.0.3' 104} 105 106dependencies { 107 implementation 'androidx.preference:preference:1.2.0' 108 implementation 'com.android.support.constraint:constraint-layout:2.0.4' 109 implementation files('../../../../../prebuilts/tools/common/m2/repository/com/google/truth/truth/1.0.1/truth-1.0.1.jar') 110 // at least one compilation needs to be run (e.g. aidegen .) 111 implementation files('../../../../../out/target/common/obj/JAVA_LIBRARIES/mobile-data-download-java-proto-lite_intermediates/classes.jar') 112 androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' 113 implementation 'androidx.appcompat:appcompat:1.4.2' 114 115 // test dependencies 116 testImplementation 'junit:junit:4.+' 117 androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.4.0' 118 androidTestImplementation 'androidx.test.ext:junit:1.1.3' 119 androidTestImplementation 'androidx.test:runner:1.4.0' 120 androidTestImplementation 'androidx.test:rules:1.4.0' 121 androidTestImplementation 'org.mockito:mockito-core:1.10.19' 122} 123