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("createMermaidDependencyGraph") { | |
| group = "Reporting" | |
| description = "Creates a mermaid dependency graph for the project" | |
| doLast { | |
| val projects = mutableSetOf<Project>() | |
| val dependencies = mutableListOf<Pair<Project, Project>>() | |
| val queue = mutableListOf(rootProject) | |
| while (queue.isNotEmpty()) { | |
| val project = queue.removeAt(0) | |
| queue.addAll(project.childProjects.values) |
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.movile.faster.sdk.util.DispatcherProvider | |
| import kotlinx.coroutines.CoroutineScope | |
| import kotlinx.coroutines.CoroutineStart | |
| import kotlinx.coroutines.Deferred | |
| import kotlinx.coroutines.async | |
| import kotlinx.coroutines.delay | |
| import kotlinx.coroutines.launch | |
| import java.util.concurrent.ConcurrentHashMap | |
| class CoroutineThrottler( |
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
| on run {input, parameters} | |
| set myPath to POSIX path of input | |
| set cmd to "vim " & quote & myPath & quote | |
| tell application "iTerm2" | |
| tell current window | |
| create tab with default profile | |
| tell current session | |
| write text cmd | |
| end tell | |
| end tell |
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
| static def isLinuxOrMacOs() { | |
| def osName = System.getProperty('os.name').toLowerCase(Locale.ROOT) | |
| return osName.contains('linux') || osName.contains('mac os') || osName.contains('macos') | |
| } | |
| task copyGitHooks(type: Copy) { | |
| description 'Copies the git hooks from team-props/git-hooks to the .git folder.' | |
| from("${rootDir}/team-props/git-hooks/") { | |
| include '**/*.sh' | |
| rename '(.*).sh', '$1' |
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
| libraryVersion=0.1.0 | |
| libraryArtifactId=kotlin-library | |
| proguardVersion=7.0.1 |
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 "Running git pre-commit hook" | |
| ./gradlew ktlintCi | |
| ./gradlew detektCi | |
| RESULT=$? | |
| # 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
| configurations { detekt } | |
| dependencies { detekt "io.gitlab.arturbosch.detekt:detekt-cli:$detektVersion" } | |
| task detektCi(type: JavaExec, group: "verification") { | |
| description = "Run Kotlin static analysis on changed files." | |
| group = "CI" | |
| main = "io.gitlab.arturbosch.detekt.cli.Main" | |
| classpath = configurations.detekt | |
| doFirst { |
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
| configurations { ktlint } | |
| dependencies { ktlint "com.pinterest:ktlint:$ktlintVersion" } | |
| task ktlintCi(type: JavaExec, group: "verification") { | |
| description = "Run Kotlin linter on changed files." | |
| group = "CI" | |
| main = "com.pinterest.ktlint.Main" | |
| classpath = configurations.ktlint | |
| doFirst { |