Manuals
Manuals




This translation is community contributed and may not be up to date. We only maintain the English version of the documentation. Read this manual in English

Android 向けの Gradle

一般的な Android アプリケーションのビルド方法とは異なり、Defold ではビルド処理全体に Gradle を使用しません。Defold はローカルでのビルドでは aapt2bundletool などの Android コマンドラインツールを直接使用し、ビルドサーバーで依存関係を解決する際にのみ Gradle を利用します。

依存関係の解決

ネイティブ拡張(native extension)では、manifests/android フォルダーに build.gradle ファイルを含めて、拡張の依存関係を指定できます。例:

repositories {
    mavenCentral()
}

dependencies {
    implementation 'com.google.firebase:firebase-installations:17.2.0'
    implementation 'com.google.android.gms:play-services-base:18.2.0'
}

ビルドサーバーは、すべての拡張から build.gradle ファイルを収集し、これらを使用してすべての依存関係を解決し、ネイティブコードのビルド時にそれらを含めます。

例: