Skip to content

Commit

Permalink
Merge pull request #109 from sschuberth/master
Browse files Browse the repository at this point in the history
Use Gradle 2.12's new compileOnly configuration for the Android plugin
  • Loading branch information
hierynomus committed Jun 7, 2016
2 parents afcfd70 + 6267aa1 commit a18f74d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: "com.gradle.plugin-publish"
apply plugin: 'license'
apply plugin: 'optional-base'

buildscript {
repositories {
Expand Down Expand Up @@ -53,9 +52,12 @@ dependencies {
exclude group: 'org.apache.maven', module: 'maven-plugin-api'
exclude group: 'org.apache.maven', module: 'maven-project'
}
compile 'com.android.tools.build:gradle:2.0.+', optional
compile gradleApi()

def androidGradlePlugin = 'com.android.tools.build:gradle:2.0.+'
compileOnly androidGradlePlugin
testCompile androidGradlePlugin

testCompile 'junit:junit:4.11'
testCompile 'com.google.guava:guava:17.0'
testCompile('org.spockframework:spock-core:0.7-groovy-2.0') {
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ dependencies {
exclude group: 'org.apache.maven', module: 'maven-plugin-api'
exclude group: 'org.apache.maven', module: 'maven-project'
}
compile 'com.android.tools.build:gradle:1.0.+'
compile gradleApi()

compileOnly 'com.android.tools.build:gradle:2.0.+'
}

sourceSets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import org.gradle.api.artifacts.FileCollectionDependency
import org.gradle.api.artifacts.ResolvedArtifact
import org.gradle.api.logging.Logger
import org.gradle.api.logging.Logging
import org.gradle.api.tasks.TaskExecutionException

import static DependencyMetadata.noLicenseMetaData

Expand Down Expand Up @@ -217,7 +216,7 @@ class LicenseResolver {
if (ignoreFatalParseErrors) {
return noLicenseMetaData(dependencyDesc)
} else {
throw new TaskExecutionException(e.getMessage())
throw e
}
}

Expand Down

0 comments on commit a18f74d

Please sign in to comment.