plugins {
id "org.gradle.test-retry" version "1.4.0" apply false
}
def isCiServer = System.getenv().containsKey("CI")
gradle.beforeProject { p ->
p.pluginManager.withPlugin("java") {
This file contains 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 Benford(sample: Array<BigInteger>) { | |
override fun toString() = str | |
private val firstDigits = IntArray(9) | |
private val count = sample.size.toDouble() | |
private val str: String | |
init { | |
for (n in sample) { | |
firstDigits[n.toString().substring(0, 1).toInt() - 1]++ |
This file contains 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
abstract class CurlRequestValueSource : ValueSource<String, CurlRequestValueSource.Parameters> { | |
interface Parameters : ValueSourceParameters { | |
val server: Property<String> | |
} | |
@get:Inject | |
abstract val execOperations: ExecOperations | |
override fun obtain(): String { | |
return execOperations.exec { |
This file contains 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
androidComponents { | |
onVariants { variant -> | |
afterEvaluate { | |
tasks.named<KspTask>("ksp${variant.name.capitalize()}Kotlin").configure { | |
options.add( | |
org.jetbrains.kotlin.gradle.plugin.SubpluginOption( | |
"apoption", | |
"room.schemaLocation=${project.layout.projectDirectory.dir("schemas-${variant.name}").asFile.path}" | |
) |
This file contains 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
<pluginManagement> | |
<plugins> | |
<plugin> | |
<groupId>com.gradle</groupId> | |
<artifactId>gradle-enterprise-maven-extension</artifactId> | |
<configuration> | |
<gradleEnterprise> | |
<plugins> | |
<plugin> | |
<groupId>com.mycila</groupId> |
This file contains 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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
ext.kotlin_version = "1.3.72" | |
repositories { | |
google() | |
jcenter() | |
maven { | |
url = "http://oss.jfrog.org/artifactory/oss-snapshot-local" | |
} | |
} |
This file contains 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
buildscript { | |
ext.kotlin_version = "1.3.72" | |
repositories { | |
google() | |
jcenter() | |
maven { | |
url = "http://oss.jfrog.org/artifactory/oss-snapshot-local" | |
} | |
} |
This file contains 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
buildscript { | |
repositories { | |
mavenLocal() | |
maven { | |
url 'https://plugins.gradle.org/m2/' | |
} | |
} | |
dependencies { | |
classpath 'gradle.plugin.net.idlestate:gradle-redis-build-cache:1.2.1' |
This file contains 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
kubectl apply -f https://k8s.io/examples/application/guestbook/redis-master-deployment.yaml | |
kubectl apply -f https://k8s.io/examples/application/guestbook/redis-master-service.yaml | |
kubectl apply -f https://k8s.io/examples/application/guestbook/redis-slave-deployment.yaml | |
kubectl apply -f https://k8s.io/examples/application/guestbook/redis-slave-service.yaml | |
kubectl expose deployment redis-master --type=LoadBalancer --name=my-service | |
This file contains 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
hybridPublisher { | |
taskPublisher = ElasticSearchPublisherConfiguration().apply { | |
url = "http://localhost:9200" | |
taskIndexName = "task" | |
} | |
buildPublisher = InfluxDbPublisherConfiguration().apply { | |
dbName = "tracking" | |
url = "http://localhost:8086" | |
buildMetricName = "build" | |
} |