This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| android { | |
| buildTypes { | |
| release { | |
| minifyEnabled true | |
| proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
| } | |
| debug { | |
| testCoverageEnabled true | |
| minifyEnabled true | |
| proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-debug.pro' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def build_param = "${build}" | |
| if (build_param == "devCI") { | |
| // Exclude all except mockDebug flavor | |
| android.variantFilter { variant -> | |
| if (variant.getFlavors().get(0).name != 'mock' || variant.buildType.name != 'debug') { | |
| variant.setIgnore(true) | |
| } | |
| } | |
| } else if (build_param == "releaseCI") { | |
| // Exclude all except prodRelease flavor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| language: android | |
| jdk: | |
| - oraclejdk8 | |
| android: | |
| components: | |
| - tools | |
| - platform-tools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| JVM | DVM | |
|---|---|---|
| Not free | Free | |
| Use .class bytecode | Convert .class bytecode to .dex bytecode using dex compiler (dx tool) | |
| Stack based | Register based |
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 2 columns, instead of 3 in line 2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| JIT, AOT | |
| Dynamic translate part of bytecode to machine code and cache in memory when app run, Statically translate bytecode to machine code at installation time and store in storage | |
| Small memory, One time event, code execute faster but need extra space and time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| JIT | AOT | |
|---|---|---|
| Dynamic translate part of bytecode to machine code and cache in memory when app run | Statically translate bytecode to machine code at installation time and store in storage | |
| Small memory | One time event. Code execute faster but need extra space and time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dalvik VM | ART | |
|---|---|---|
| JIT compilation | Ahead-of-time (AOT) and just-in-time (JIT) compilation (Android 7.0) with code profiling | |
| No extra installation time and storage space | Take time and storage space to translate .dex file during install | |
| Use dex opt to convert .dex bytecode to .odex bytecode | Use dex2oat to generate .oat native code from .dex bytecode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object SaberFactory { | |
| fun makeLightSaber(powers: Int): LightSaber { | |
| return LightSaber(powers) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Saber(val powers: Int) { | |
| companion object Factory { | |
| fun makeLightSaber(powers: Int): LightSaber { | |
| return LightSaber(powers) | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object SaberFactory { | |
| fun makeLightSaber() { /*...*/ } | |
| } | |
| class SaberFactory { | |
| fun makeLightSaber() { /*...*/ } | |
| } |