/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qbs.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \contentspage index.html
    \qmltype Android.sdk
    \inqmlmodule QbsModules
    \since Qbs 1.4

    \brief Provides support for building Android packages.

    The Android.sdk module contains the properties and rules to create Android
    application packages from Java sources, resources, and so on.
    It is usually pulled in indirectly by declaring an \l Application product.

    \section2 Relevant File Tags
    \target filetags-android-sdk

    \table
    \header
        \li Tag
        \li Auto-tagged File Names
        \li Since
        \li Description
    \row
        \li \c{"android.aidl"}
        \li \c{*.aidl}
        \li 1.4.0
        \li Attached to Android AIDL files. One Java source file will be
            generated for each such file.
    \row
        \li \c{"android.assets"}
        \li -
        \li 1.4.0
        \li Attached to Android assets, which are typically located in an
            \c{assets/} subdirectory. These files are tagged automatically
            if the \l automaticSources property is enabled.
    \row
        \li \c{"android.manifest"}
        \li \c{AndroidManifest.xml}
        \li 1.4.0
        \li Attached to the Android manifest. There must be one such file for
            every Android app.
    \row
        \li \c{"android.resources"}
        \li -
        \li 1.4.0
        \li Attached to Android resources, which are typically located in a
            \c{res/} subdirectory. These files are tagged automatically
            if the \l automaticSources property is enabled.
    \endtable
*/

/*!
    \qmlproperty string Android.sdk::buildToolsVersion

    The version of the build tools such as \c aapt and \c dx.

    \defaultvalue Highest build tools version version available in the SDK.
*/

/*!
    \qmlproperty string Android.sdk::ndkDir

    The NDK base directory, if an NDK is present.

    \defaultvalue Determined automatically based on standard search paths.
*/

/*!
    \qmlproperty string Android.sdk::platform

    The versioned platform name (for example, \c "android-21").

    \defaultvalue Highest build tools version version available in the SDK.
*/

/*!
    \qmlproperty string Android.sdk::sdkDir

    The SDK base directory.

    \defaultvalue Determined automatically based on standard search paths.
*/

/*!
    \qmlproperty bool Android.sdk::embedJar
    \since Qbs 1.10

    If \c true, then if the dependency is a JAR file, its classes and the
    classes of its dependencies (if \c{embedJar} is also true for them) will
    be recursively processed by \c{dex} and included in the final APK.

    \defaultvalue \c{true}
*/

/*!
    \qmlproperty path Android.sdk::assetsDir

    The base directory for Android assets in the respective product.

    \note Android requires that the file name of this directory is always
    \c "assets".

    \defaultvalue \c "src/main/assets" in the product source directory
*/

/*!
    \qmlproperty bool Android.sdk::automaticSources

    If \c true, Java sources as well as Android resources, assets, and the
    manifest file will be automatically included in the respective product
    via wildcards. Set this property to \c false if you want to specify
    these files manually.

    \defaultvalue \c true
*/

/*!
    \qmlproperty string Android.sdk::manifestFile

    The file path to the Android manifest file.
    This property is only relevant if \l automaticSources is enabled.

    \note Android requires that the file name is always "AndroidManifest.xml".

    \defaultvalue \c "src/main/AndroidManifest.xml" in the product source directory
*/

/*!
    \qmlproperty string Android.sdk::packageName

    The package name of the respective product. The \c package attribute in the manifest file
    will be set to this value automatically.

    \defaultvalue \c name
*/

/*!
    \qmlproperty string Android.sdk::versionCode

    The Android Manifest version code of the respective product. The \c android:versionCode
    attribute in the manifest file will be set to this value if not undefined.

    In the following example we provide an architecture-specific value
    for \c android:versionCode:

    \code
    // ...
    property int _version: 1
    property int _patchVersion: 0
    Android.sdk.versionCode: {
        switch (Android.ndk.abi) {
        case "armeabi-v7a":
            return 132000000 | _version * 10 + _patchVersion;
        case "arm64-v8a":
            return 164000000 | _version * 10 + _patchVersion;
        case "x86":
            return 232000000 | _version * 10 + _patchVersion;
        case "x86_64":
            return 264000000 | _version * 10 + _patchVersion;
        }
        throw "Unknown architecture";
    }
    \endcode

    \defaultvalue \c undefined
*/

/*!
    \qmlproperty string Android.sdk::versionName

    The Android Manifest version name of the respective product. The \c android:versionName
    attribute in the manifest file will be set to this value if not undefined.

    \defaultvalue \c undefined
*/

/*!
    \qmlproperty path Android.sdk::resourcesDir

    The base directory for Android resources in the respective product.

    \note Android requires that the file name of this directory is always
    \c "res".

    \defaultvalue \c "src/main/res" in the product source directory
*/

/*!
    \qmlproperty path Android.sdk::sourcesDir

    The base directory for Java sources. This property is only relevant if
    \l automaticSources is enabled.

    \defaultvalue \c "src/main/java" in the product source directory
*/

/*!
    \qmlproperty string Android.sdk::apkBaseName

    The base name of the APK file to to be built, that is, the file name
    without the ".apk" extension.

    \defaultvalue \l packageName
*/

/*!
  \qmlproperty stringList Android.sdk::aidlSearchPaths
  Search paths for import statements to pass to the \c aidl tool via the \c{-I} option.
*/
