|
| 1 | +// Copyright 2024 The Android Open Source Project |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | +apply from: '../../constants.gradle' |
| 15 | +apply plugin: 'com.android.application' |
| 16 | +apply plugin: 'kotlin-android' |
| 17 | + |
| 18 | +android { |
| 19 | + namespace 'androidx.media3.demo.effect' |
| 20 | + |
| 21 | + compileSdk project.ext.compileSdkVersion |
| 22 | + |
| 23 | + compileOptions { |
| 24 | + sourceCompatibility JavaVersion.VERSION_1_8 |
| 25 | + targetCompatibility JavaVersion.VERSION_1_8 |
| 26 | + } |
| 27 | + |
| 28 | + kotlinOptions { |
| 29 | + jvmTarget = '1.8' |
| 30 | + } |
| 31 | + |
| 32 | + defaultConfig { |
| 33 | + versionName project.ext.releaseVersion |
| 34 | + versionCode project.ext.releaseVersionCode |
| 35 | + minSdkVersion project.ext.minSdkVersion |
| 36 | + targetSdkVersion project.ext.appTargetSdkVersion |
| 37 | + } |
| 38 | + |
| 39 | + buildTypes { |
| 40 | + release { |
| 41 | + shrinkResources true |
| 42 | + minifyEnabled true |
| 43 | + signingConfig signingConfigs.debug |
| 44 | + } |
| 45 | + debug { |
| 46 | + jniDebuggable = true |
| 47 | + } |
| 48 | + } |
| 49 | + |
| 50 | + lintOptions { |
| 51 | + // The demo app isn't indexed, and doesn't have translations. |
| 52 | + disable 'GoogleAppIndexingWarning','MissingTranslation' |
| 53 | + } |
| 54 | + buildFeatures { |
| 55 | + compose true |
| 56 | + } |
| 57 | + composeOptions { |
| 58 | + kotlinCompilerExtensionVersion = "1.5.3" |
| 59 | + } |
| 60 | + |
| 61 | + testOptions { |
| 62 | + unitTests { |
| 63 | + includeAndroidResources = true |
| 64 | + } |
| 65 | + } |
| 66 | +} |
| 67 | + |
| 68 | +dependencies { |
| 69 | + def composeBom = platform('androidx.compose:compose-bom:2024.10.00') |
| 70 | + implementation composeBom |
| 71 | + |
| 72 | + implementation 'androidx.activity:activity-compose:1.9.3' |
| 73 | + implementation 'androidx.compose.foundation:foundation-android:1.7.4' |
| 74 | + implementation 'androidx.compose.material3:material3-android:1.3.0' |
| 75 | + implementation 'com.google.android.material:material:' + androidxMaterialVersion |
| 76 | + |
| 77 | + // For detecting and debugging leaks only. LeakCanary is not needed for demo app to work. |
| 78 | + debugImplementation 'com.squareup.leakcanary:leakcanary-android:' + leakCanaryVersion |
| 79 | +} |
0 commit comments