diff options
author | Xavier Ducrohet <xav@google.com> | 2013-11-22 17:50:20 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@google.com> | 2013-11-25 11:13:40 -0800 |
commit | 6e00045fd570c43f8e37109e9bc8b32b1a6cb510 (patch) | |
tree | 5e70a57799c1632381df5c976c6a3a5f4d631476 /builder-model/src/main/java/com/android/builder/model | |
parent | 60aa3e26bfb1d3c263e6789446df7a9526ac1603 (diff) | |
download | build-6e00045fd570c43f8e37109e9bc8b32b1a6cb510.tar.gz |
Improved BuildConfig.
- Now contains Package name, Build Type name, flavor names,
version name and code.
- Improved DSL allow overriding through build type or flavors
Change-Id: I8a1bd723c39e714b5eb2cb569da347058d7a3400
Diffstat (limited to 'builder-model/src/main/java/com/android/builder/model')
-rw-r--r-- | builder-model/src/main/java/com/android/builder/model/BaseConfig.java | 6 | ||||
-rw-r--r-- | builder-model/src/main/java/com/android/builder/model/ClassField.java | 33 |
2 files changed, 36 insertions, 3 deletions
diff --git a/builder-model/src/main/java/com/android/builder/model/BaseConfig.java b/builder-model/src/main/java/com/android/builder/model/BaseConfig.java index fbf6eb4..713b344 100644 --- a/builder-model/src/main/java/com/android/builder/model/BaseConfig.java +++ b/builder-model/src/main/java/com/android/builder/model/BaseConfig.java @@ -27,11 +27,11 @@ import java.util.List; public interface BaseConfig { /** - * List of Build Config lines. - * @return a non-null list of lines (possibly empty) + * List of Build Config Fields + * @return a non-null list of class fields (possibly empty) */ @NonNull - List<String> getBuildConfig(); + List<ClassField> getBuildConfigFields(); /** * Returns the list of proguard rule files. diff --git a/builder-model/src/main/java/com/android/builder/model/ClassField.java b/builder-model/src/main/java/com/android/builder/model/ClassField.java new file mode 100644 index 0000000..d6b6a26 --- /dev/null +++ b/builder-model/src/main/java/com/android/builder/model/ClassField.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.builder.model; + +import com.android.annotations.NonNull; + +/** + * A Simple class field with name, type and value, all as strings. + */ +public interface ClassField { + @NonNull + String getType(); + + @NonNull + String getName(); + + @NonNull + String getValue(); +} |