因此,我一直在尝试使用http://tools.android.com/tech-docs/new-build-system自动化 Android 构建。
我仍然不清楚如何准确地使用构建系统,所以如果有人有这方面的经验或一般的 Gradle 可能能够为我回答以下问题。
使用此构建文件作为参考。
//
// A basic Android application that follows all the conventions
//
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.2'
    }
}
apply plugin: 'android'
android {
    target = "android-15"
    testBuildType = "debug"
    defaultConfig {
        versionCode = 12
        versionName = "2.0"
        minSdkVersion = 16
        targetSdkVersion = 16
        signingStoreLocation = "debug.keystore"
        signingStorePassword = "android"
        signingKeyAlias = "androiddebugkey"
        signingKeyPassword = "android"
        buildConfig "private final static boolean DEFAULT = true;", \
                    "private final static String FOO = \"foo\";"
    }
    buildTypes {
        debug {
            packageNameSuffix = ".debug"
            buildConfig "private final static boolean DEBUG2 = false;"
        }
    }
    sourceSets {
       main {}
       test {}
    }
    aaptOptions {
        noCompress "txt"
    }
}
- 您究竟是如何向它添加依赖项以进行构建的?使用 Gradle 的依赖项会给我带来构建错误。
 - 您将如何创建不同的构建环境?然后从命令行运行这些?
 - 在 main 和 test 之外的 sourceSets 有什么意义?
 
感谢您的帮助,除了上述问题之外的任何一般指南将不胜感激。