Skip to content

Commit

Permalink
Remove redundant gradle configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Karn committed Jun 1, 2019
1 parent 897569f commit a1c34fe
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 38 deletions.
37 changes: 17 additions & 20 deletions build.gradle
@@ -1,35 +1,32 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
group = 'io.karn'

subprojects {
buildscript {
apply from: rootProject.file('gradle/configuration.gradle')

buildscript {

repositories {
google()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
repositories {
google()
jcenter()
}

dependencies {
classpath config.build.gradle.androidPlugin
classpath config.build.gradle.kotlin
dependencies {
classpath config.build.gradle.androidPlugin
classpath config.build.gradle.kotlin

// NOTE: Do not place your application configuration here; they belong
// in the individual module build.gradle files
classpath config.build.gradle.androidMaven
// Code coverage
classpath config.build.gradle.jacoco
// Library documentation
classpath config.build.gradle.dokka
}
// NOTE: Do not place your application configuration here; they belong
// in the individual module build.gradle files
classpath config.build.gradle.androidMaven
// Code coverage
classpath config.build.gradle.jacoco
// Library documentation
classpath config.build.gradle.dokka
}
}

subprojects {
repositories {
google()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
}

Expand Down
19 changes: 3 additions & 16 deletions library/build.gradle
Expand Up @@ -58,9 +58,7 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

lintOptions {
abortOnError false
}
lintOptions.abortOnError false

testOptions {
unitTests {
Expand All @@ -69,13 +67,6 @@ android {
}
}

allprojects {
repositories {
google()
jcenter()
}
}

dependencies {
implementation config.deps.kotlin.stdlib

Expand All @@ -85,9 +76,7 @@ dependencies {
testImplementation config.testDeps.robolectric
}

jacoco {
toolVersion = config.build.jacocoAgentVersion
}
jacoco.toolVersion = config.build.jacocoAgentVersion

tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
Expand All @@ -104,9 +93,7 @@ task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
}

artifacts {
archives sourcesJar
}
artifacts.archives sourcesJar

/**
* Adapted from https://medium.com/@rafael_toledo/unified-code-coverage-for-android-revisited-44789c9b722f
Expand Down
4 changes: 2 additions & 2 deletions sample/build.gradle
Expand Up @@ -52,9 +52,9 @@ dependencies {
implementation project(path: ':library')
}

// Skip teting and linting.
// Skip testing and linting.
tasks.whenTaskAdded { task ->
if (task.name.equals("lint") || task.name.contains("Test")) {
if (task.name == "lint" || task.name.contains("Test")) {
task.enabled = false
}
}

0 comments on commit a1c34fe

Please sign in to comment.