そのため、 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 のポイントは何ですか?
助けてくれてありがとう。上記の質問に加えて、一般的なガイドをいただければ幸いです。