For generic skin emulator with default apis (without google apis):
-
List All System Images Available for Download:
sdkmanager --list | grep system-images
-
Download Image:
sdkmanager --install "system-images;android-29;default;x86"
apply plugin: 'jacoco' | |
jacoco { | |
toolVersion = "0.8.8" | |
} | |
task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) { | |
group "Reporting" | |
description "Generate Jacoco coverage reports." |
apply plugin: 'jacoco' | |
task jacocoUnitTestReport(type: JacocoReport, dependsOn: ['testAppDebugUnitTest']) { | |
reports { | |
xml.enabled true | |
html.enabled true | |
} | |
def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*'] |
object LocalServer { | |
private var server: CIOApplicationEngine? = null | |
fun start() { | |
val assets = InstrumentationRegistry.getInstrumentation().context.assets | |
server?.stop() | |
server = embeddedServer(CIO, port = 8080) { | |
routing { | |
get("api/path/here") { |
# | |
# This ProGuard configuration file illustrates how to process a program | |
# library, such that it remains usable as a library. | |
# Usage: | |
# java -jar proguard.jar @library.pro | |
# | |
# Specify the input jars, output jars, and library jars. | |
# In this case, the input jar is the program library that we want to process. |
apply plugin: 'maven-publish' | |
// SDK version is passed in as a parameter when you run the script assemble_and_deploy_lib.sh or you can uncomment the below and use the version from gradle.properties | |
// version SDK_ARTIFACT_VERSION // version picked up from gradle.properties | |
String sdkVersion = System.getenv('SDK_VERSION') != null ? System.getenv('SDK_VERSION') : SDK_ARTIFACT_VERSION | |
publishing { | |
publications { | |
sdk(MavenPublication) { |
def isNonStable = { String version -> | |
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) } | |
def regex = /^[0-9,.v-]+$/ | |
return !stableKeyword && !(version ==~ regex) | |
} | |
dependencyUpdates { | |
resolutionStrategy { | |
componentSelection { | |
all { |
tasks.register('detektFix', io.gitlab.arturbosch.detekt.Detekt) { | |
description = "Runs over whole code base without the starting overhead for each module." | |
autoCorrect = true | |
parallel = true | |
setSource(files(projectDir)) | |
include("**/*.kt") | |
include("**/*.kts") | |
exclude("**/resources/**") | |
exclude("**/build/**") | |
exclude("**/test/**/*.kt") |
#!/bin/sh | |
filesToFormat="$( | |
git --no-pager diff --cached --diff-filter=d --name-only | |
)" | |
echo '[git hook] executing gradle detekt and lint before push' | |
SHOULD_RESET=0 | |
if [[ -n $(git status -s) ]]; then |
build: | |
maxIssues: 0 | |
excludeCorrectable: false | |
weights: | |
# complexity: 2 | |
# LongParameterList: 1 | |
# style: 1 | |
# comments: 1 | |
config: |