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
| @Composable | |
| fun ComposeFunctionsTheme( | |
| darkTheme: Boolean = isSystemInDarkTheme(), | |
| content: @Composable () -> Unit | |
| ) { | |
| val palette = if (darkTheme) { DarkColorPalette } else { LightColorPalette } | |
| MaterialTheme( | |
| colors = palette.switch(), | |
| typography = Typography, |
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
| task installGitHook(type: Copy) { | |
| from new File(rootProject.rootDir, 'githook/pre-commit') | |
| into { new File(rootProject.rootDir, '../.git/hooks') } | |
| fileMode 0777 | |
| } | |
| tasks.getByPath(':app:preBuild').dependsOn installGitHook |
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/bash | |
| echo "Git hook pre commit ktlintCheck" | |
| cd mobile-and || return | |
| ./gradlew app:ktlintCheck --daemon | |
| STATUS=$? | |
| # return 1 exit code if running checks fails |
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
| plugins { | |
| id("io.gitlab.arturbosch.detekt").version("1.14.2") | |
| } | |
| detekt { | |
| toolVersion = "1.14.2" | |
| input = files("$projectDir") | |
| config = files("$project.projectDir/config/detekt.yml") | |
| reports { | |
| xml { |
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
| task installGitHook(type: Copy) { | |
| def lintingConfigScript = new File(rootProject.rootDir, '.git/hooks/pre-commit') | |
| if (!lintingConfigScript.exists()) { | |
| from new File(rootProject.rootDir, '.githooks/pre-commit') | |
| into { new File(rootProject.rootDir, '.git/hooks') } | |
| fileMode 0777 | |
| } | |
| } | |
| tasks.getByPath('app:preBuild').dependsOn installGitHook |
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
| name: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| clean: |
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.jakewharton.retrofit2.adapter.kotlin.coroutines.CoroutineCallAdapterFactory | |
| import com.squareup.moshi.Moshi | |
| import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory | |
| import kotlinx.coroutines.Deferred | |
| import retrofit2.Retrofit | |
| import retrofit2.converter.moshi.MoshiConverterFactory | |
| import retrofit2.http.GET | |
| private const val BASE_URL = "PUT_HERE_URL" |
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 retrofit2.Call | |
| import retrofit2.Retrofit | |
| import retrofit2.converter.scalars.ScalarsConverterFactory | |
| import retrofit2.http.GET | |
| private const val BASE_URL = "PUT_HERE_URL" | |
| private val retrofit = Retrofit.Builder() | |
| .addConverterFactory(ScalarsConverterFactory.create()) | |
| .baseUrl(BASE_URL) |