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
import com.android.build.OutputFile | |
android { | |
splits { | |
//... | |
} | |
// Map for the version code that gives each ABI a value. | |
def abiCodes = ['x86':1, 'x86_64':2, 'armeabi-v7a':3, 'arm64-v8a':4] |
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 { | |
splits { | |
abi { | |
def isReleaseBuild = false | |
gradle.startParameter.taskNames.find { | |
// Enable split for release builds in different build flavors | |
// (assemblePaidRelease, assembleFreeRelease, etc.). | |
if (it ==~ /:app:assemble.*Release/) { | |
isReleaseBuild = true |
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 { | |
splits { | |
// Configures multiple APKs based on ABI. | |
abi { | |
// Enables building multiple APKs per ABI. | |
enable true | |
// By default all ABIs are included, so use reset() and include to specify that we only | |
// want APKs for x86, armeabi-v7a, and mips. | |
reset() |
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
buildTypes { | |
release { | |
ndk { | |
abiFilters "arm64-v8a", "armeabi-v7a" | |
} | |
} |
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
Observable.just(1) | |
.doOnNext { log.info("Next item emited: $it") } | |
.doOnError { log.error($it) } | |
.doOnComplete { log.info("Emission complete") } |
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
fun sumMe(a:Int): Int { | |
return sum(a, a) | |
} | |
fun sum (a:Int, b:Int): Int { | |
log.info("Added $a + $b") | |
return a + b | |
} |
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
fun sum (a:Int, b:Int): Int { | |
if(a > b) { | |
throw IllegalAccessException() | |
} | |
return a + b | |
} |
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
fun increatePatientAge(patient:Patient): Patient { | |
patient.age = patient.age++ | |
return patient | |
} |
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
fun getCurrentTime(): Long { | |
return System.currentTimeMillis() | |
} | |
fun getBoolean(): Boolean { | |
return Random().nextBoolean() | |
} |
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
fun setPatient() { | |
return this.patient | |
} |