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 MockServerRule( | |
private val appStartUpOverrideMockRequests: List<MockRequest> = emptyList<MockRequest>() | |
) : TestRule { | |
private var overrideRequests = mutableMapOf<String, MockRequest>() | |
override fun apply( | |
base: Statement, | |
description: Description | |
): Statement { |
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
apply plugin: 'jacoco' | |
jacoco { | |
toolVersion = "0.8.8" | |
} | |
task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) { | |
group "Reporting" | |
description "Generate Jacoco coverage reports." |
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
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/**/*.*'] |
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
io-ktor = "2.3.11" | |
io-ktor-ktor-client-android = { module = "io.ktor:ktor-client-android", version.ref = "io-ktor" } | |
io-ktor-ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "io-ktor" } | |
io-ktor-ktor-server-cio = { module = "io.ktor:ktor-server-cio", version.ref = "io-ktor" } | |
io-ktor-ktor-server-core = { module = "io.ktor:ktor-server-core", version.ref = "io-ktor" } | |
object LocalServer { | |
private var server: CIOApplicationEngine? = null |
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
# | |
# 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. |
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
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) { |
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 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 { |
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
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") |
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
#!/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 |
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
build: | |
maxIssues: 0 | |
excludeCorrectable: false | |
weights: | |
# complexity: 2 | |
# LongParameterList: 1 | |
# style: 1 | |
# comments: 1 | |
config: |
NewerOlder