diff --git a/android/android_ldc_armv7a.mk b/android/android_ldc_armv7a.mk index 467b010c..26d9b7ca 100644 --- a/android/android_ldc_armv7a.mk +++ b/android/android_ldc_armv7a.mk @@ -2,9 +2,16 @@ PLATFORM_DIR=armeabi-v7a echo "\nLOCAL_MODULE: $LOCAL_MODULE" + +OS_TYPE="unknown" +case "$OSTYPE" in + msys*|cygwin*) OS_TYPE="windows" ;; + linux*) OS_TYPE="linux" ;; +esac + LDC_PARAMS="-mtriple=armv7-none-linux-androideabi -relocation-model=pic " -export LD=$NDK/toolchains/llvm/prebuilt/linux-$NDK_ARCH/bin/llvm-link -export CC=$NDK/toolchains/llvm/prebuilt/linux-$NDK_ARCH/bin/clang +export LD=$NDK/toolchains/llvm/prebuilt/$OS_TYPE-$NDK_ARCH/bin/llvm-link +export CC=$NDK/toolchains/llvm/prebuilt/$OS_TYPE-$NDK_ARCH/bin/clang SOURCES="$LOCAL_SRC_FILES $DLANGUI_SOURCES" SOURCE_PATHS="-I./jni $DLANGUI_SOURCE_PATHS $DLANGUI_IMPORT_PATHS" @@ -24,7 +31,7 @@ LINK_OPTIONS="\ -Wl,-soname,libnative-activity.so \ -shared \ --sysroot=$NDK/platforms/$ANDROID_TARGET/arch-arm \ --gcc-toolchain $NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-$NDK_ARCH \ +-gcc-toolchain $NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/$OS_TYPE-$NDK_ARCH \ -no-canonical-prefixes \ -target armv7-none-linux-androideabi \ -Wl,--fix-cortex-a8 \ diff --git a/android/android_project/README.md b/android/android_project/README.md index 0600261c..e14c3d2c 100644 --- a/android/android_project/README.md +++ b/android/android_project/README.md @@ -23,11 +23,13 @@ android_build_config.mk Update paths to Android NDK, SDK, DlangUI source directory. Default values: +``` export DLANGUI_DIR=$HOME/src/d/dlangui export NDK=$HOME/android-ndk-r11c export SDK=$HOME/android-sdk-linux export LDC=$HOME/ldc2-android-arm-0.17.0-alpha2-linux-x86_64 export NDK_ARCH=x86_64 +``` Use LDC cross compiler for armv7a build according instructions @@ -35,6 +37,33 @@ Use LDC cross compiler for armv7a build according instructions https://wiki.dlang.org/Build_LDC_for_Android#Build_a_sample_OpenGL_Android_app_ported_to_D + +Dependencies +============ + +FreeType dependency is needed for dlangui, as well as D runtime for android + +1\) Build D runtime with LDC +(should this be done inside LDC install folder?) + +For this and the next tasks ninja and cmake build systems is needed, +refer to https://wiki.dlang.org/Build_D_for_Android for more info + + +``` +set CC %ANDROID_HOME%\ndk-bundle\prebuilt\windows-x86_64\bin\clang.exe +ldc-build-runtime --ninja --targetPreset=Android-arm --dFlags="-w;-mcpu=cortex-a8" --buildDir=droid32 +``` + +2\) Download and build FreeType + +on Windows just run ./get_ft.ps1 && ./build_ft.bat + +currently there is no scripts for Linux so you have to adapt those manually + +then copy the binaries to your project android libs/ folder + + Building ======== diff --git a/android/android_project/compile_ft.bat b/android/android_project/compile_ft.bat new file mode 100644 index 00000000..88d8b033 --- /dev/null +++ b/android/android_project/compile_ft.bat @@ -0,0 +1,7 @@ +cd freetype-2.9.1 +mkdir build-arm +cd build-arm +set CC=%NDK%\prebuilt\windows-x86_64\bin\clang +set NDK=%ANDROID_HOME%\ndk-bundle +cmake .. -G"Ninja" -DCMAKE_TOOLCHAIN_FILE=%NDK%\build\cmake\android.toolchain.cmake -DCMAKE_SYSTEM_NAME="Android" -DANDROID_NDK=%NDK% -DANDROID_TOOLCHAIN=clang -DANDROID_PLATFORM=android-21 -DBUILD_SHARED_LIBS=ON +cmake --build . --config Release \ No newline at end of file diff --git a/android/android_project/get_ft.ps1 b/android/android_project/get_ft.ps1 new file mode 100644 index 00000000..dd7ab0f7 --- /dev/null +++ b/android/android_project/get_ft.ps1 @@ -0,0 +1,4 @@ +wget https://download.savannah.gnu.org/releases/freetype/ft291.zip -OutFile ./ft291.zip +Remove-Item -Path "freetype-2.9.1" -Recurse -Force +Expand-Archive -Path ft291.zip -DestinationPath . +cmd compile_ft.bat \ No newline at end of file diff --git a/android/dlangui_source_files.mk b/android/dlangui_source_files.mk index 2e1b574f..5e772f33 100644 --- a/android/dlangui_source_files.mk +++ b/android/dlangui_source_files.mk @@ -4,6 +4,7 @@ DLANGUI_SOURCES="\ $DLANGUI_DIR/src/dlangui/platforms/android/androidapp.d \ +$DLANGUI_DIR/src/dlangui/platforms/android/imm.d \ $DLANGUI_DIR/src/dlangui/platforms/common/startup.d \ $DLANGUI_DIR/src/dlangui/platforms/common/platform.d \ $DLANGUI_DIR/src/dlangui/dialogs/filedlg.d \ diff --git a/examples/android/.gitignore b/examples/android/.gitignore new file mode 100644 index 00000000..217b7e2c --- /dev/null +++ b/examples/android/.gitignore @@ -0,0 +1,7 @@ +/local.properties +/.idea +/.gradle +/build +/*.iml +/libs +/app/*.iml diff --git a/examples/android/android_build_config.mk b/examples/android/android_build_config.mk index d96b0d13..478edd11 100644 --- a/examples/android/android_build_config.mk +++ b/examples/android/android_build_config.mk @@ -3,9 +3,9 @@ #========================================================================= # Modify this file to specify DLANGUI, Android NDK, SDK and LDC2 locations. -export DLANGUI_DIR=/media/toshiba/dev/ernomon +export DLANGUI_DIR=$DLANGUI_DIR export NDK=$NDK export SDK=$ANDROID_HOME export LDC=$LDC export NDK_ARCH=x86_64 -export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ +export JAVA_HOME=$JAVA_HOME diff --git a/examples/android/app/app.iml b/examples/android/app/app.iml deleted file mode 100644 index c99ec6a4..00000000 --- a/examples/android/app/app.iml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/android/app/build.gradle b/examples/android/app/build.gradle index 80972e81..b53328aa 100644 --- a/examples/android/app/build.gradle +++ b/examples/android/app/build.gradle @@ -38,7 +38,7 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.1' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' + //testImplementation 'junit:junit:4.12' + //androidTestImplementation 'com.android.support.test:runner:1.0.1' + //androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' } diff --git a/examples/android/build.gradle b/examples/android/build.gradle index 020eae2e..4082391d 100644 --- a/examples/android/build.gradle +++ b/examples/android/build.gradle @@ -7,7 +7,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.0' + classpath 'com.android.tools.build:gradle:3.3.1' // NOTE: Do not place your application dependencies here; they belong diff --git a/examples/android/build/android-profile/profile-2017-11-06-22-03-30-739.json b/examples/android/build/android-profile/profile-2017-11-06-22-03-30-739.json deleted file mode 100644 index c749dd4e..00000000 --- a/examples/android/build/android-profile/profile-2017-11-06-22-03-30-739.json +++ /dev/null @@ -1 +0,0 @@ -[{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609471000,"args":{"JVM stats":"heap_memory_usage: 267345264\nnon_heap_memory_usage: 192762592\nloaded_class_count: 17151\nthread_count: 34\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609571000,"args":{"JVM stats":"heap_memory_usage: 278977512\nnon_heap_memory_usage: 192526848\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609631000,"args":{"JVM stats":"heap_memory_usage: 282215824\nnon_heap_memory_usage: 192528832\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609632000,"args":{"JVM stats":"heap_memory_usage: 282215824\nnon_heap_memory_usage: 192528832\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609670000,"args":{"JVM stats":"heap_memory_usage: 288312472\nnon_heap_memory_usage: 192564824\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609676000,"args":{"JVM stats":"heap_memory_usage: 289122120\nnon_heap_memory_usage: 192566296\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609681000,"args":{"JVM stats":"heap_memory_usage: 290340544\nnon_heap_memory_usage: 192567192\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609682000,"args":{"JVM stats":"heap_memory_usage: 290340544\nnon_heap_memory_usage: 192567192\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609683000,"args":{"JVM stats":"heap_memory_usage: 290626520\nnon_heap_memory_usage: 192573624\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609683001,"args":{"JVM stats":"heap_memory_usage: 290626520\nnon_heap_memory_usage: 192573624\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609684000,"args":{"JVM stats":"heap_memory_usage: 290761336\nnon_heap_memory_usage: 192573624\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998609685000,"args":{"JVM stats":"heap_memory_usage: 290761336\nnon_heap_memory_usage: 192573624\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610008000,"args":{"JVM stats":"heap_memory_usage: 402143104\nnon_heap_memory_usage: 192697176\nloaded_class_count: 17151\nthread_count: 64\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610011000,"args":{"JVM stats":"heap_memory_usage: 404526208\nnon_heap_memory_usage: 192708968\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610027000,"args":{"JVM stats":"heap_memory_usage: 410473280\nnon_heap_memory_usage: 192808896\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610028000,"args":{"JVM stats":"heap_memory_usage: 410881672\nnon_heap_memory_usage: 192840320\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610212000,"args":{"JVM stats":"heap_memory_usage: 424839712\nnon_heap_memory_usage: 193082784\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610213000,"args":{"JVM stats":"heap_memory_usage: 424905264\nnon_heap_memory_usage: 193082784\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610235000,"args":{"JVM stats":"heap_memory_usage: 429871400\nnon_heap_memory_usage: 193068464\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610242000,"args":{"JVM stats":"heap_memory_usage: 430415920\nnon_heap_memory_usage: 193068464\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610255000,"args":{"JVM stats":"heap_memory_usage: 433255064\nnon_heap_memory_usage: 192986480\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610259000,"args":{"JVM stats":"heap_memory_usage: 433934344\nnon_heap_memory_usage: 192986480\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610262000,"args":{"JVM stats":"heap_memory_usage: 434355032\nnon_heap_memory_usage: 192985176\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610263000,"args":{"JVM stats":"heap_memory_usage: 434355032\nnon_heap_memory_usage: 192984024\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610263001,"args":{"JVM stats":"heap_memory_usage: 434497992\nnon_heap_memory_usage: 192984024\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610564000,"args":{"JVM stats":"heap_memory_usage: 524902584\nnon_heap_memory_usage: 192816184\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610566000,"args":{"JVM stats":"heap_memory_usage: 527042688\nnon_heap_memory_usage: 192816184\nloaded_class_count: 17151\nthread_count: 65\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610731000,"args":{"JVM stats":"heap_memory_usage: 536306408\nnon_heap_memory_usage: 192869592\nloaded_class_count: 17151\nthread_count: 66\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610731001,"args":{"JVM stats":"heap_memory_usage: 536441176\nnon_heap_memory_usage: 192872056\nloaded_class_count: 17151\nthread_count: 66\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610735000,"args":{"JVM stats":"heap_memory_usage: 537004936\nnon_heap_memory_usage: 192894240\nloaded_class_count: 17151\nthread_count: 66\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":0,"ph":"i","name":"Memory sample","ts":1509998610739000,"args":{"JVM stats":"heap_memory_usage: 537139704\nnon_heap_memory_usage: 192894240\nloaded_class_count: 17151\nthread_count: 50\ngarbage_collection_stats {\n name: \"PS Scavenge\"\n gc_collections: 0\n gc_time: 0\n}\ngarbage_collection_stats {\n name: \"PS MarkSweep\"\n gc_collections: 0\n gc_time: 0\n}\n"}},{"pid":1,"tid":16,"id":2,"name":"base plugin project configure","args":{"span_id":"2","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609471000,"dur":5000},{"pid":1,"tid":16,"id":3,"name":"base plugin project base extension creation","args":{"span_id":"3","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609476000,"dur":5000},{"pid":1,"tid":16,"id":5,"name":"task manager create tasks","args":{"span_id":"5","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609481000,"dur":5000},{"pid":1,"tid":16,"id":4,"name":"base plugin project tasks creation","args":{"span_id":"4","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609481000,"dur":5000},{"pid":1,"tid":16,"id":8,"name":"variant manager create variants","args":{"span_id":"8","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609530000,"dur":2000},{"pid":1,"tid":16,"id":9,"name":"variant manager create tests tasks","args":{"span_id":"9","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609532000,"dur":1000},{"pid":1,"tid":16,"id":11,"name":"app task manager create merge manifest task","args":{"span_id":"11","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609534000,"dur":100},{"pid":1,"tid":16,"id":12,"name":"app task manager create generate res values task","args":{"span_id":"12","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609534000,"dur":1000},{"pid":1,"tid":16,"id":13,"name":"app task manager create create renderscript task","args":{"span_id":"13","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609535000,"dur":100},{"pid":1,"tid":16,"id":14,"name":"app task manager create merge resources task","args":{"span_id":"14","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609535000,"dur":2000},{"pid":1,"tid":16,"id":15,"name":"app task manager create merge assets task","args":{"span_id":"15","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609537000,"dur":1000},{"pid":1,"tid":16,"id":16,"name":"app task manager create build config task","args":{"span_id":"16","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609538000,"dur":1000},{"pid":1,"tid":16,"id":17,"name":"app task manager create process res task","args":{"span_id":"17","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609539000,"dur":2000},{"pid":1,"tid":16,"id":18,"name":"app task manager create aidl task","args":{"span_id":"18","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609541000,"dur":1000},{"pid":1,"tid":16,"id":19,"name":"app task manager create shader task","args":{"span_id":"19","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609542000,"dur":100},{"pid":1,"tid":16,"id":20,"name":"app task manager create ndk task","args":{"span_id":"20","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609542000,"dur":100},{"pid":1,"tid":16,"id":21,"name":"app task manager create external native build task","args":{"span_id":"21","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609542000,"dur":100},{"pid":1,"tid":16,"id":22,"name":"app task manager create merge jnilibs folders task","args":{"span_id":"22","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609542000,"dur":1000},{"pid":1,"tid":16,"id":23,"name":"app task manager create compile task","args":{"span_id":"23","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609543000,"dur":4000},{"pid":1,"tid":16,"id":24,"name":"app task manager create packaging task","args":{"span_id":"24","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609550000,"dur":1000},{"pid":1,"tid":16,"id":25,"name":"app task manager create lint task","args":{"span_id":"25","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609551000,"dur":100},{"pid":1,"tid":16,"id":10,"name":"variant manager create tasks for variant","args":{"span_id":"10","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609533000,"dur":18000},{"pid":1,"tid":16,"id":26,"name":"variant manager create tasks for variant","args":{"span_id":"26","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609551000,"dur":2000},{"pid":1,"tid":16,"id":28,"name":"app task manager create merge manifest task","args":{"span_id":"28","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609553000,"dur":100},{"pid":1,"tid":16,"id":29,"name":"app task manager create generate res values task","args":{"span_id":"29","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609553000,"dur":100},{"pid":1,"tid":16,"id":30,"name":"app task manager create create renderscript task","args":{"span_id":"30","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609553000,"dur":100},{"pid":1,"tid":16,"id":31,"name":"app task manager create merge resources task","args":{"span_id":"31","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609553000,"dur":100},{"pid":1,"tid":16,"id":32,"name":"app task manager create merge assets task","args":{"span_id":"32","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609553000,"dur":100},{"pid":1,"tid":16,"id":33,"name":"app task manager create build config task","args":{"span_id":"33","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609553000,"dur":100},{"pid":1,"tid":16,"id":34,"name":"app task manager create process res task","args":{"span_id":"34","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609553000,"dur":1000},{"pid":1,"tid":16,"id":35,"name":"app task manager create aidl task","args":{"span_id":"35","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609554000,"dur":100},{"pid":1,"tid":16,"id":36,"name":"app task manager create shader task","args":{"span_id":"36","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609554000,"dur":100},{"pid":1,"tid":16,"id":37,"name":"app task manager create ndk task","args":{"span_id":"37","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609554000,"dur":100},{"pid":1,"tid":16,"id":38,"name":"app task manager create external native build task","args":{"span_id":"38","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609554000,"dur":100},{"pid":1,"tid":16,"id":39,"name":"app task manager create merge jnilibs folders task","args":{"span_id":"39","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609554000,"dur":100},{"pid":1,"tid":16,"id":40,"name":"app task manager create compile task","args":{"span_id":"40","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609554000,"dur":1000},{"pid":1,"tid":16,"id":41,"name":"app task manager create packaging task","args":{"span_id":"41","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609556000,"dur":100},{"pid":1,"tid":16,"id":42,"name":"app task manager create lint task","args":{"span_id":"42","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609556000,"dur":100},{"pid":1,"tid":16,"id":27,"name":"variant manager create tasks for variant","args":{"span_id":"27","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 2\nis_debug: false\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n"},"ph":"X","ts":1509998609553000,"dur":3000},{"pid":1,"tid":16,"id":43,"name":"variant manager create tasks for variant","args":{"span_id":"43","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609556000,"dur":2000},{"pid":1,"tid":16,"id":44,"name":"variant manager create tasks for variant","args":{"span_id":"44","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609558000,"dur":4000},{"pid":1,"tid":16,"id":7,"name":"variant manager create android tasks","args":{"span_id":"7","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609530000,"dur":32000},{"pid":1,"tid":16,"id":45,"name":"variant manager external native config values","args":{"span_id":"45","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609562000,"dur":100},{"pid":1,"tid":16,"id":6,"name":"base plugin create android tasks","args":{"span_id":"6","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998609487000,"dur":75000},{"pid":1,"tid":0,"id":46,"name":"task: delete","args":{"span_id":"46","task":"type: 104\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998609570000,"dur":1000},{"pid":1,"tid":0,"id":47,"name":"task: delete","args":{"span_id":"47","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 104\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998609571000,"dur":60000},{"pid":1,"tid":0,"id":48,"name":"task: unknown task type","args":{"span_id":"48","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 0\ndid_work: false\nskipped: true\nup_to_date: true\nfailed: false\n"},"ph":"X","ts":1509998609632000,"dur":100},{"pid":1,"tid":0,"id":49,"name":"task: app pre build","args":{"span_id":"49","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n","task":"type: 92\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998609632000,"dur":38000},{"pid":1,"tid":0,"id":50,"name":"task: aidl compile","args":{"span_id":"50","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n","task":"type: 1\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998609671000,"dur":5000},{"pid":1,"tid":0,"id":51,"name":"task: renderscript compile","args":{"span_id":"51","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n","task":"type: 54\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998609677000,"dur":4000},{"pid":1,"tid":0,"id":52,"name":"task: check manifest","args":{"span_id":"52","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n","task":"type: 8\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998609681000,"dur":1000},{"pid":1,"tid":0,"id":53,"name":"task: generate build config","args":{"span_id":"53","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n","task":"type: 24\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998609682000,"dur":1000},{"pid":1,"tid":0,"id":54,"name":"task: prepare lint jar","args":{"span_id":"54","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 119\ndid_work: false\nskipped: true\nup_to_date: true\nfailed: false\n"},"ph":"X","ts":1509998609683000,"dur":100},{"pid":1,"tid":0,"id":55,"name":"task: generate res values","args":{"span_id":"55","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n","task":"type: 26\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998609684000,"dur":100},{"pid":1,"tid":0,"id":56,"name":"task: unknown task type","args":{"span_id":"56","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 0\ndid_work: false\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998609684000,"dur":100},{"pid":1,"tid":0,"id":57,"name":"task: merge resources","args":{"span_id":"57","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n","task":"type: 40\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998609685000,"dur":323000},{"pid":1,"tid":0,"id":58,"name":"task: compatible screens manifest","args":{"span_id":"58","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n","task":"type: 9\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610009000,"dur":2000},{"pid":1,"tid":0,"id":59,"name":"task: merge manifests","args":{"span_id":"59","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n","task":"type: 39\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610012000,"dur":15000},{"pid":1,"tid":0,"id":60,"name":"task: splits discovery","args":{"span_id":"60","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n","task":"type: 87\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610027000,"dur":1000},{"pid":1,"tid":0,"id":61,"name":"task: process android resources","args":{"span_id":"61","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","variant":"id: 1\nis_debug: true\nminify_enabled: false\nuse_multidex: false\nuse_legacy_multidex: false\nvariant_type: APPLICATION\nmin_sdk_version {\n api_level: 19\n}\ntarget_sdk_version {\n api_level: 21\n}\ndex_builder: DX_DEXER\ndex_merger: DX_MERGER\n","task":"type: 51\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610028000,"dur":184000},{"pid":1,"tid":0,"id":62,"name":"task: unknown task type","args":{"span_id":"62","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 0\ndid_work: false\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610213000,"dur":100},{"pid":1,"tid":0,"id":63,"name":"task: test pre build","args":{"span_id":"63","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 93\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610213000,"dur":22000},{"pid":1,"tid":0,"id":64,"name":"task: aidl compile","args":{"span_id":"64","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 1\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610236000,"dur":6000},{"pid":1,"tid":0,"id":65,"name":"task: process test manifest","args":{"span_id":"65","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 53\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610242000,"dur":13000},{"pid":1,"tid":0,"id":66,"name":"task: renderscript compile","args":{"span_id":"66","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 54\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610255000,"dur":4000},{"pid":1,"tid":0,"id":67,"name":"task: generate build config","args":{"span_id":"67","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 24\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610260000,"dur":2000},{"pid":1,"tid":0,"id":68,"name":"task: generate res values","args":{"span_id":"68","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 26\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610262000,"dur":1000},{"pid":1,"tid":0,"id":69,"name":"task: unknown task type","args":{"span_id":"69","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 0\ndid_work: false\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610263000,"dur":100},{"pid":1,"tid":0,"id":70,"name":"task: merge resources","args":{"span_id":"70","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 40\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610264000,"dur":300000},{"pid":1,"tid":0,"id":71,"name":"task: splits discovery","args":{"span_id":"71","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 87\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610564000,"dur":2000},{"pid":1,"tid":0,"id":72,"name":"task: process android resources","args":{"span_id":"72","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 51\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610567000,"dur":164000},{"pid":1,"tid":0,"id":73,"name":"task: unknown task type","args":{"span_id":"73","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 0\ndid_work: false\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610731000,"dur":100},{"pid":1,"tid":0,"id":74,"name":"task: mockable android jar","args":{"span_id":"74","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n","task":"type: 42\ndid_work: true\nskipped: false\nup_to_date: false\nfailed: false\n"},"ph":"X","ts":1509998610731000,"dur":4000},{"pid":1,"tid":16,"id":75,"name":"base plugin build finished","args":{"span_id":"75","project":"id: 1\nandroid_plugin_version: \"3.0.0\"\nandroid_plugin: APPLICATION\nplugin_generation: FIRST\nbuild_tools_version: \"26.0.2\"\ncompile_sdk: \"android-26\"\nsplits {\n}\n"},"ph":"X","ts":1509998610736000,"dur":100}] \ No newline at end of file diff --git a/examples/android/build/android-profile/profile-2017-11-06-22-03-30-739.rawproto b/examples/android/build/android-profile/profile-2017-11-06-22-03-30-739.rawproto deleted file mode 100644 index a0721248..00000000 Binary files a/examples/android/build/android-profile/profile-2017-11-06-22-03-30-739.rawproto and /dev/null differ diff --git a/examples/android/build_apk.sh b/examples/android/build_apk.sh index 9c237f33..46128bcc 100755 --- a/examples/android/build_apk.sh +++ b/examples/android/build_apk.sh @@ -35,8 +35,15 @@ die () { #========================================================= #$SDK/tools/android update project -p . -s --target $ANDROID_TARGET || die 3 "Android Project update is failed" +# This is not necessary, even in the docs gradle recommend to build with wrapper but I find it annoying to +# download all that versions for all projects, so that's what this check is for +GRADLE=gradlew +if gradle --version >/dev/null 2>&1; then + GRADLE=gradle +fi + echo "Building APK..." #========================================================= -./gradlew assembleDebug || die 4 "Android APK creation is failed" +GRADLE assembleDebug || die 4 "Android APK creation is failed" echo "Successful." diff --git a/examples/android/example.iml b/examples/android/example.iml deleted file mode 100644 index f82f0d8a..00000000 --- a/examples/android/example.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/android/gradle/wrapper/gradle-wrapper.jar b/examples/android/gradle/wrapper/gradle-wrapper.jar index 13372aef..87b738cb 100644 Binary files a/examples/android/gradle/wrapper/gradle-wrapper.jar and b/examples/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/examples/android/gradle/wrapper/gradle-wrapper.properties b/examples/android/gradle/wrapper/gradle-wrapper.properties index f8babaee..558870da 100644 --- a/examples/android/gradle/wrapper/gradle-wrapper.properties +++ b/examples/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Mon Nov 06 21:19:18 EET 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip diff --git a/examples/android/gradlew b/examples/android/gradlew index 9d82f789..af6708ff 100755 --- a/examples/android/gradlew +++ b/examples/android/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -6,42 +6,6 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" @@ -60,6 +24,46 @@ cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" cd "$SAVED" >/dev/null +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -85,7 +89,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -150,11 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/examples/android/gradlew.bat b/examples/android/gradlew.bat index aec99730..0f8d5937 100644 --- a/examples/android/gradlew.bat +++ b/examples/android/gradlew.bat @@ -8,14 +8,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,10 +46,9 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +59,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/examples/android/local.properties b/examples/android/local.properties deleted file mode 100644 index f4e1b3e5..00000000 --- a/examples/android/local.properties +++ /dev/null @@ -1,12 +0,0 @@ -## This file is automatically generated by Android Studio. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must *NOT* be checked into Version Control Systems, -# as it contains information specific to your local configuration. -# -# Location of the SDK. This is only used by Gradle. -# For customization when using a Version Control System, please read the -# header note. -#Mon Nov 06 21:25:18 EET 2017 -ndk.dir=/media/erno/TOSHIBA_ISO/Android/Sdk/ndk-bundle -sdk.dir=/media/erno/TOSHIBA_ISO/Android/Sdk diff --git a/src/dlangui/platforms/android/androidapp.d b/src/dlangui/platforms/android/androidapp.d index f76ef462..13e3fd9e 100644 --- a/src/dlangui/platforms/android/androidapp.d +++ b/src/dlangui/platforms/android/androidapp.d @@ -16,6 +16,7 @@ import dlangui.platforms.common.platform; import android.input, android.looper : ALooper_pollAll; import android.native_window : ANativeWindow_setBuffersGeometry; import android.configuration; +import android.keycodes; import android.log, android.android_native_app_glue; /** @@ -139,6 +140,8 @@ class AndroidWindow : Window { * Process the next input event. */ int handle_input(AInputEvent* event) { + import imm = dlangui.platforms.android.imm; + import std.conv : to; Log.i("handle input, event=", AInputEvent_getType(event)); auto et = AInputEvent_getType(event); if (et == AINPUT_EVENT_TYPE_MOTION) { @@ -173,7 +176,37 @@ class AndroidWindow : Window { return 1; } else if (et == AINPUT_EVENT_TYPE_KEY) { Log.d("AINPUT_EVENT_TYPE_KEY"); - return 0; + KeyEvent evt; + auto app = (cast(AndroidPlatform)platform)._appstate; + int _keyFlags = AKeyEvent_getMetaState(event).toKeyFlag(); + int sysKeyCode = AKeyEvent_getKeyCode(event); + int sysMeta = AKeyEvent_getMetaState(event); + int keyCode = androidKeyMap.get(sysKeyCode, KeyCode.init); + auto action = toKeyAction(AKeyEvent_getAction(event)); + int char_ = imm.GetUnicodeChar(app, action, sysKeyCode, sysMeta); + dchar[] text; + if (!isTextEditControl(sysKeyCode)) { + if (AKeyEvent_getAction(event) == AKEY_EVENT_ACTION_MULTIPLE) { + // it's a string from IME + if (sysKeyCode == AKEYCODE_UNKNOWN) { + text = cast(dchar[]) to!dstring(imm.GetUnicodeString(app, event)); + action = KeyAction.Text; + } + // else repeat character AKeyEvent_getRepeatCount() times + } + else if (AKeyEvent_getAction(event) == AKEY_EVENT_ACTION_DOWN && (char_ || isASCIIChar(sysKeyCode))) { + text ~= cast(dchar)(char_ == 0 ? sysKeyCode : char_); + action = KeyAction.Text; + } + } + Log.d("ACTION: ", action, " syskeyCode: ", sysKeyCode, " sysMeta: ", sysMeta, "meta: ", _keyFlags, " char '", cast(dchar)char_, "' str:", cast(dstring)text); + if (action == KeyAction.Text) + evt = new KeyEvent(KeyAction.Text, 0, 0, cast(dstring)text); + else + evt = new KeyEvent(action, keyCode, _keyFlags); + if (evt && dispatchKeyEvent(evt)) + update(); + return 1; } return 0; } @@ -225,6 +258,12 @@ class AndroidPlatform : Platform { } + void showSoftKeyboard(bool shouldShow) { + import imm = dlangui.platforms.android.imm; + imm.showSoftKeyboard(_appstate, shouldShow); + } + + /** * Initialize an EGL context for the current display. */ @@ -706,3 +745,82 @@ extern (C) void android_main(android_app* state) { } + +private KeyAction toKeyAction(int androidKeyAction) { + switch(androidKeyAction) { + case AKEY_EVENT_ACTION_DOWN: return KeyAction.KeyDown; + case AKEY_EVENT_ACTION_UP: return KeyAction.KeyUp; + case AKEY_EVENT_ACTION_MULTIPLE: return KeyAction.Repeat; // can also be text + default: + assert(0, "should never reach this"); + } +} + + +private bool isASCIIChar(int ch) { + return 31 < ch && ch < 127; +} + +// Text editor controls such as move caret or (de)select +private bool isTextEditControl(int keyCode) { + switch (keyCode){ + case AKEYCODE_DEL: // backspace ("DEL" or "", "(II)V"); + jobject eventObj = (*env).NewObject(env, class_key_event, eventConstructor, eventType, keyCode); + + unicodeKey = (*env).CallIntMethod(env, eventObj, method_get_unicode_char); + } + else + { + jmethodID method_get_unicode_char = (*env).GetMethodID(env, class_key_event, "getUnicodeChar", "(I)I"); + jmethodID eventConstructor = (*env).GetMethodID(env, class_key_event, "", "(II)V"); + jobject eventObj = (*env).NewObject(env, class_key_event, eventConstructor, eventType, keyCode); + + unicodeKey = (*env).CallIntMethod(env, eventObj, method_get_unicode_char, metaState); + } + + (*javaVM).DetachCurrentThread(javaVM); + + return unicodeKey; +} + + +// Issue: native app glue seems to mess up the input. +// It is clearly seen in debugger that initally key event do have real input, +// but second time it is called it is all messed up +string GetUnicodeString(android_app* app, AInputEvent* event) +{ + string str; + auto javaVM = app.activity.vm; + auto env = app.activity.env; + + JavaVMAttachArgs attachArgs; + attachArgs.version_ = JNI_VERSION_1_6; + attachArgs.name = "NativeThread"; + attachArgs.group = null; + + if ((*javaVM).AttachCurrentThread(javaVM, &env, &attachArgs) == JNI_ERR) + { + Log.e("showSoftKeyboard Unable to attach to JVM"); + return null; + } + + + jclass class_key_event = (*env).FindClass(env, "android/view/KeyEvent"); + + jmethodID eventConstructor = (*env).GetMethodID(env, class_key_event, "", "(JJIIIIIIII)V"); + jobject eventObj = (*env).NewObject(env, class_key_event, eventConstructor, + AKeyEvent_getDownTime(event), + AKeyEvent_getEventTime(event), + AKeyEvent_getAction(event), + AKeyEvent_getKeyCode(event), + AKeyEvent_getRepeatCount(event), + AKeyEvent_getMetaState(event), + AInputEvent_getDeviceId(event), + AKeyEvent_getScanCode(event), + AKeyEvent_getFlags(event), + AInputEvent_getSource(event) + ); + + // this won't work because characters is a member passed on construction and getCharacter() is just a getter + jmethodID method_get_characters = (*env).GetMethodID(env, class_key_event, "getCharacters", "()Ljava/lang/String;"); + if (auto jstr = (*env).CallObjectMethod(env, eventObj, method_get_characters)) { + str.length = (*env).GetStringUTFLength(env, jstr); + (*env).GetStringUTFRegion(env, jstr, 0, str.length, cast(char*)str.ptr); + } + + { + jmethodID method_get_unicode_char = (*env).GetMethodID(env, class_key_event, "getUnicodeChar", "()I"); + int unicodeKey = (*env).CallIntMethod(env, eventObj, method_get_unicode_char); + if (str.length == 0) { + import std.conv : to; + dchar[] tmp; + tmp ~= unicodeKey; + str = to!string(tmp); + } + } + + (*javaVM).DetachCurrentThread(javaVM); + + return str; +} \ No newline at end of file diff --git a/src/dlangui/widgets/editors.d b/src/dlangui/widgets/editors.d index 88857657..534b003c 100644 --- a/src/dlangui/widgets/editors.d +++ b/src/dlangui/widgets/editors.d @@ -345,8 +345,10 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction /// sets focus to this widget or suitable focusable child, returns previously focused widget override Widget setFocus(FocusReason reason = FocusReason.Unspecified) { Widget res = super.setFocus(reason); - if (focused) + if (focused) { + showSoftKeyboard(); handleEditorStateChange(); + } return res; } diff --git a/src/dlangui/widgets/widget.d b/src/dlangui/widgets/widget.d index 655d6762..294a5343 100644 --- a/src/dlangui/widgets/widget.d +++ b/src/dlangui/widgets/widget.d @@ -1099,6 +1099,7 @@ public: // try to find focusable child return window.focusedWidget; } + hideSoftKeyboard(); return window.setFocus(this, reason); } /// searches children for first focusable item, returns null if not found @@ -1116,6 +1117,24 @@ public: return null; } + /// + final void hideSoftKeyboard() { + version(Android) { + import dlangui.platforms.android.androidapp; + if (auto androidPlatform = cast(AndroidPlatform)platform) + androidPlatform.showSoftKeyboard(false); + } + } + + /// Shows system virtual keyabord where applicable + final void showSoftKeyboard() { + version(Android) { + import dlangui.platforms.android.androidapp; + if (auto androidPlatform = cast(AndroidPlatform)platform) + androidPlatform.showSoftKeyboard(true); + } + } + // ======================================================= // Events