]> nv-tegra.nvidia Code Review - android/platform/tools/build.git/blob - gradle/src/main/groovy/com/android/build/gradle/AndroidExtension.groovy
Change the way AndroidBuilder is configured.
[android/platform/tools/build.git] / gradle / src / main / groovy / com / android / build / gradle / AndroidExtension.groovy
1 /*
2  * Copyright (C) 2012 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 package com.android.build.gradle
17
18 import com.android.builder.BuildType
19 import com.android.builder.ProductFlavor
20 import org.gradle.api.Action
21 import org.gradle.api.NamedDomainObjectContainer
22 import com.android.builder.AaptOptions
23 import com.android.builder.DexOptions
24
25 class AndroidExtension extends BaseAndroidExtension {
26     final NamedDomainObjectContainer<ProductFlavor> productFlavors
27
28     String testBuildType = "debug"
29
30     // FIXME?
31     final AaptOptions aaptOptions = new AaptOptions()
32     final DexOptions dexOptions = new DexOptions()
33
34     AndroidExtension(NamedDomainObjectContainer<BuildType> buildTypes,
35                      NamedDomainObjectContainer<ProductFlavor> productFlavors) {
36         super(buildTypes)
37         this.productFlavors = productFlavors
38     }
39
40     void productFlavors(Action<? super NamedDomainObjectContainer<ProductFlavor>> action) {
41         action.execute(productFlavors)
42     }
43 }