diff options
Diffstat (limited to 'tests/auto/blackbox/testdata-android/multiple-apks-per-project')
12 files changed, 239 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/multiple-apks-per-project.qbs b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/multiple-apks-per-project.qbs new file mode 100644 index 000000000..3d03c309a --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/multiple-apks-per-project.qbs @@ -0,0 +1,8 @@ +import qbs + +Project { + references: [ + "product1", + "product2", + ] +} diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/product1.qbs b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/product1.qbs new file mode 100644 index 000000000..0ddd7526c --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/product1.qbs @@ -0,0 +1,31 @@ +import qbs + +Project { + DynamicLibrary { + Depends { name: "Android.ndk" } + Depends { name: "cpp" } + name: "p1lib1" + files: ["src/main/jni/lib1.cpp"] + Android.ndk.appStl: "stlport_shared" + qbs.architectures: !qbs.architecture ? ["mips", "x86"] : undefined + cpp.useRPaths: false + } + + DynamicLibrary { + Depends { name: "Android.ndk" } + Depends { name: "cpp" } + name: "p1lib2" + files: ["src/main/jni/lib2.cpp"] + Android.ndk.appStl: "stlport_shared" + cpp.useRPaths: false + } + + AndroidApk { + name: "twolibs1" + packageName: "io.qt.dummy1" + Depends { + productTypes: ["android.nativelibrary"] + limitToSubProject: true + } + } +} diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/AndroidManifest.xml b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/AndroidManifest.xml new file mode 100644 index 000000000..1468b52f6 --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/AndroidManifest.xml @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.qt.dummy1" android:versionCode="1" android:versionName="1.0"> + <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="19"/> + <uses-feature android:glEsVersion="0x00020000"/> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> + <application android:allowBackup="true" android:hasCode="true" android:name="io.qt.dummy"> + <activity android:name="dummy" android:debuggable="true" android:configChanges="orientation|keyboardHidden"> + <!-- Tell NativeActivity the name of or .so --> + <meta-data android:name="android.app.lib_name" android:value="dummy1"/> + <intent-filter> + <action android:name="android.intent.action.MAIN"/> + <category android:name="android.intent.category.LAUNCHER"/> + </intent-filter> + </activity> + </application> +</manifest> diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/java/io/qt/dummy/Dummy.java b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/java/io/qt/dummy/Dummy.java new file mode 100644 index 000000000..149af081f --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/java/io/qt/dummy/Dummy.java @@ -0,0 +1,11 @@ +package io.qt.dummy; + +import android.app.Activity; + +public class Dummy extends Activity +{ + static { + System.loadLibrary("lib1"); + System.loadLibrary("lib"); + } +} diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/jni/lib1.cpp b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/jni/lib1.cpp new file mode 100644 index 000000000..474897da9 --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/jni/lib1.cpp @@ -0,0 +1,29 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qbs. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +void f() {} diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/jni/lib2.cpp b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/jni/lib2.cpp new file mode 100644 index 000000000..de580ab09 --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/jni/lib2.cpp @@ -0,0 +1,29 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qbs. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +void g() {} diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/res/values/strings.xml b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/res/values/strings.xml new file mode 100644 index 000000000..949748954 --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product1/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name">dummy1</string> +</resources> diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/product2.qbs b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/product2.qbs new file mode 100644 index 000000000..f0418a425 --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/product2.qbs @@ -0,0 +1,27 @@ +import qbs + +Project { + DynamicLibrary { + Depends { name: "cpp" } + name: "p2lib1" + files: ["src/main/jni/lib1.cpp"] + cpp.useRPaths: false + } + + DynamicLibrary { + Depends { name: "Android.ndk" } + Depends { name: "cpp" } + name: "p2lib2" + files: ["src/main/jni/lib2.cpp"] + Android.ndk.appStl: "stlport_shared" + } + + AndroidApk { + name: "twolibs2" + packageName: "io.qt.dummy2" + Depends { + productTypes: ["android.nativelibrary"] + limitToSubProject: true + } + } +} diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/AndroidManifest.xml b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/AndroidManifest.xml new file mode 100644 index 000000000..4e5cdf977 --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/AndroidManifest.xml @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.qt.dummy2" android:versionCode="1" android:versionName="1.0"> + <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="19"/> + <uses-feature android:glEsVersion="0x00020000"/> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> + <application android:allowBackup="true" android:hasCode="true" android:name="io.qt.dummy"> + <activity android:name="dummy" android:debuggable="true" android:configChanges="orientation|keyboardHidden"> + <!-- Tell NativeActivity the name of or .so --> + <meta-data android:name="android.app.lib_name" android:value="dummy2"/> + <intent-filter> + <action android:name="android.intent.action.MAIN"/> + <category android:name="android.intent.category.LAUNCHER"/> + </intent-filter> + </activity> + </application> +</manifest> diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/java/io/qt/dummy/Dummy.java b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/java/io/qt/dummy/Dummy.java new file mode 100644 index 000000000..149af081f --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/java/io/qt/dummy/Dummy.java @@ -0,0 +1,11 @@ +package io.qt.dummy; + +import android.app.Activity; + +public class Dummy extends Activity +{ + static { + System.loadLibrary("lib1"); + System.loadLibrary("lib"); + } +} diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/jni/lib1.cpp b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/jni/lib1.cpp new file mode 100644 index 000000000..474897da9 --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/jni/lib1.cpp @@ -0,0 +1,29 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qbs. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +void f() {} diff --git a/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/jni/lib2.cpp b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/jni/lib2.cpp new file mode 100644 index 000000000..de580ab09 --- /dev/null +++ b/tests/auto/blackbox/testdata-android/multiple-apks-per-project/product2/src/main/jni/lib2.cpp @@ -0,0 +1,29 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qbs. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +void g() {} |