Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Rewrite root gradle files using the Kotlin DSL
Browse files Browse the repository at this point in the history
2 down, 1 to go.

Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
  • Loading branch information
Harsh Shandilya committed Dec 6, 2018
1 parent a900755 commit 5065e08
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 48 deletions.
47 changes: 0 additions & 47 deletions build.gradle

This file was deleted.

52 changes: 52 additions & 0 deletions build.gradle.kts
@@ -0,0 +1,52 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask

buildscript {
repositories {
google()
jcenter()
mavenCentral()
maven(url = "https://maven.fabric.io/public")
}
dependencies {
classpath("com.android.tools.build:gradle:3.2.1")
classpath("com.google.gms:google-services:4.2.0")
classpath("io.fabric.tools:gradle:1.26.1")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

plugins {
id("com.github.ben-manes.versions") version "0.20.0"
}

allprojects {
repositories {
google()
jcenter()
maven(url = "https://jitpack.io")
}
}

tasks.named<DependencyUpdatesTask>("dependencyUpdates") {
checkForGradleUpdate = true
resolutionStrategy {
componentSelection {
all {
val rejected = listOf("alpha", "beta", "rc", "cr", "m", "preview")
.map { qualifier -> Regex("(?i).*[.-]$qualifier[.\\d-]*") }
.any { it.matches(candidate.version)
}
if (rejected) {
reject("Release candidate")
}
}
}
}
}

tasks {
register("clean", Delete::class) {
delete(rootProject.buildDir)
}
}
1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

1 change: 1 addition & 0 deletions settings.gradle.kts
@@ -0,0 +1 @@
include(":app")

0 comments on commit 5065e08

Please sign in to comment.