Skip to content

Commit

Permalink
Cleanup project and add Firebase analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
Iktwo committed Aug 24, 2016
1 parent 0f4dcfe commit 6755650
Show file tree
Hide file tree
Showing 21 changed files with 753 additions and 122 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ Makefile*
#QtCtreator Qml
*.qmlproject.user
*.qmlproject.user.*

*~
google-services.json
.DS_STORE
.build
.gradle
114 changes: 86 additions & 28 deletions src/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,81 @@
<?xml version="1.0"?>
<manifest package="com.iktwo.qutelauncher" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.02" android:versionCode="2" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="QuteLauncher" android:theme="@style/AppTheme" android:icon="@mipmap/ic_launcher">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="com.iktwo.qutelauncher.QuteLauncher" android:label="Qutelauncher" android:screenOrientation="unspecified" android:launchMode="singleInstance">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.iktwo.qutelauncher"
android:installLocation="auto"
android:versionCode="4"
android:versionName="0.04">

<application
android:name="org.qtproject.qt5.android.bindings.QtApplication"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="QuteLauncher"
android:theme="@style/AppTheme">

<activity
android:name="com.iktwo.qutelauncher.QuteLauncher"
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation"
android:label="Qutelauncher"
android:launchMode="singleInstance"
android:screenOrientation="unspecified">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<meta-data android:name="android.app.lib_name" android:value="qute-launcher"/>
<meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
<meta-data android:name="android.app.repository" android:value="default"/>
<meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
<meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>

<meta-data
android:name="android.app.lib_name"
android:value="qute-launcher"/>
<meta-data
android:name="android.app.qt_sources_resource_id"
android:resource="@array/qt_sources"/>
<meta-data
android:name="android.app.repository"
android:value="default"/>
<meta-data
android:name="android.app.qt_libs_resource_id"
android:resource="@array/qt_libs"/>
<meta-data
android:name="android.app.bundled_libs_resource_id"
android:resource="@array/bundled_libs"/>
<!-- Deploy Qt libs as part of package -->
<meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/>
<meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
<meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
<meta-data
android:name="android.app.bundle_local_qt_libs"
android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/>
<meta-data
android:name="android.app.bundled_in_lib_resource_id"
android:resource="@array/bundled_in_lib"/>
<meta-data
android:name="android.app.bundled_in_assets_resource_id"
android:resource="@array/bundled_in_assets"/>
<!-- Run with local libs -->
<meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
<meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
<meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/>
<meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
<meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/>
<meta-data
android:name="android.app.use_local_qt_libs"
android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
<meta-data
android:name="android.app.libs_prefix"
android:value="/data/local/tmp/qt/"/>
<meta-data
android:name="android.app.load_local_libs"
android:value="-- %%INSERT_LOCAL_LIBS%% --"/>
<meta-data
android:name="android.app.load_local_jars"
android:value="-- %%INSERT_LOCAL_JARS%% --"/>
<meta-data
android:name="android.app.static_init_classes"
android:value="-- %%INSERT_INIT_CLASSES%% --"/>
<!-- Messages maps -->
<meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/>
<meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/>
<meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/>
<meta-data
android:name="android.app.ministro_not_found_msg"
android:value="@string/ministro_not_found_msg"/>
<meta-data
android:name="android.app.ministro_needed_msg"
android:value="@string/ministro_needed_msg"/>
<meta-data
android:name="android.app.fatal_error_msg"
android:value="@string/fatal_error_msg"/>
<!-- Messages maps -->

<!-- Splash screen -->
Expand All @@ -34,18 +84,26 @@
-->
<!-- Splash screen -->
</activity>

<service
android:name="com.iktwo.qutelauncher.CustomFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>

</application>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>

<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
<!-- %%INSERT_PERMISSIONS -->
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="23"/>

<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"/>

<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
Remove the comment if you do not require these default features. -->
<!-- %%INSERT_FEATURES -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>
123 changes: 123 additions & 0 deletions src/android/android.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="android" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<afterSyncTasks>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/../../../../Qt/5.6/android_armv7/src/android/java/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$USER_HOME$/Qt/5.6/android_armv7/src/android/java/res;file://$MODULE_DIR$/res" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/.build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/.build/intermediates/classes/test/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/.build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/res/google-services/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/res/generated/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/.build/generated/res/generated/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/dex" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/mockable-android-24.jar" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/resources" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/.build/intermediates/tmp" />
<excludeFolder url="file://$MODULE_DIR$/.build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/.build/tmp" />
</content>
<content url="file://$USER_HOME$/Qt/5.6/android_armv7/src/android/java/res">
<sourceFolder url="file://$USER_HOME$/Qt/5.6/android_armv7/src/android/java/res" type="java-resource" />
</content>
<content url="file://$USER_HOME$/Qt/5.6/android_armv7/src/android/java/src">
<sourceFolder url="file://$USER_HOME$/Qt/5.6/android_armv7/src/android/java/src" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="Android API 24 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="firebase-messaging-9.4.0" level="project" />
<orderEntry type="library" exported="" name="support-media-compat-24.2.0" level="project" />
<orderEntry type="library" exported="" name="support-compat-24.2.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-24.2.0" level="project" />
<orderEntry type="library" exported="" name="play-services-base-9.4.0" level="project" />
<orderEntry type="library" exported="" name="support-core-ui-24.2.0" level="project" />
<orderEntry type="library" exported="" name="support-core-utils-24.2.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-24.2.0" level="project" />
<orderEntry type="library" exported="" name="play-services-basement-9.4.0" level="project" />
<orderEntry type="library" exported="" name="play-services-tasks-9.4.0" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="mockable-android-24" level="project" />
<orderEntry type="library" exported="" name="support-fragment-24.2.0" level="project" />
<orderEntry type="library" exported="" name="firebase-analytics-impl-9.4.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-24.2.0" level="project" />
<orderEntry type="library" exported="" name="support-vector-drawable-24.2.0" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-24.2.0" level="project" />
<orderEntry type="library" exported="" name="firebase-crash-9.4.0" level="project" />
<orderEntry type="library" exported="" name="firebase-core-9.4.0" level="project" />
<orderEntry type="library" exported="" name="firebase-common-9.4.0" level="project" />
<orderEntry type="library" exported="" name="firebase-analytics-9.4.0" level="project" />
<orderEntry type="library" exported="" name="firebase-iid-9.4.0" level="project" />
</component>
</module>
71 changes: 71 additions & 0 deletions src/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
buildscript {
repositories {
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.google.gms:google-services:3.0.0'
}
}

allprojects {
repositories {
jcenter()
}
}

apply plugin: 'com.android.application'

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}

android {
/*******************************************************
* The following variables:
* - androidBuildToolsVersion,
* - androidCompileSdkVersion
* - qt5AndroidDir - holds the path to qt android files
* needed to build any Qt application
* on Android.
*
* are defined in gradle.properties file. This file is
* updated by QtCreator and androiddeployqt tools.
* Changing them manually might break the compilation!
*******************************************************/

compileSdkVersion androidCompileSdkVersion.toInteger()

buildToolsVersion androidBuildToolsVersion

defaultConfig {
applicationId "com.iktwo.qutelauncher"
}

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
res.srcDirs = [qt5AndroidDir + '/res', 'res']
resources.srcDirs = ['src']
renderscript.srcDirs = ['src']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
}

lintOptions {
abortOnError false
}
}

dependencies {
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'com.google.firebase:firebase-crash:9.4.0'
}

apply plugin: 'com.google.gms.google-services'
Loading

0 comments on commit 6755650

Please sign in to comment.