Skip to content

Commit

Permalink
Update to AGP to 3.0.0
Browse files Browse the repository at this point in the history
Updated Android Gradle Plugin to 3.0.0
Updated Version to 2.0 because support for versions less than 3.0.0
is no longer supported.
  • Loading branch information
Andrew Reitz committed Nov 6, 2017
1 parent dc494d1 commit ad97c7c
Show file tree
Hide file tree
Showing 27 changed files with 535 additions and 726 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.0.0
-----
* Support for Android Gradle Plugin 3.0.0+ only. For lower versions use 1.2.0

1.2.0
-----
* Added support for annotation processing (#142)
Expand Down
6 changes: 3 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:groovyVersion: 2.4.11
:groovyVersion: 2.4.12
:pluginVersion: 1.2.0
:pluginSnapshotVersion: 1.3.0
:pluginSnapshotVersion: 2.0.0
:androidPluginVersion: 2.3.2

= Groovy language support for Android
Expand Down Expand Up @@ -70,7 +70,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'org.codehaus.groovy:groovy-android-gradle-plugin:{pluginSnapshotVersion}-SNAPSHOT'
}
}
Expand Down
20 changes: 9 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,26 @@

buildscript {
repositories {
jcenter()
google()
maven { url 'https://plugins.gradle.org/m2/' }
}

dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'org.codehaus.groovy:groovy-android-gradle-plugin:1.2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.4.12'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0'
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:3.2.0'
classpath 'com.gradle:build-scan-plugin:1.9'
classpath 'com.gradle.publish:plugin-publish-plugin:0.9.7'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.5.4'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath 'com.gradle:build-scan-plugin:1.10'
classpath 'com.gradle.publish:plugin-publish-plugin:0.9.9'
}
}

apply plugin: 'com.gradle.build-scan'
apply from: "$rootDir/gradle/idea/idea.gradle"

allprojects {
version = '1.3.0-SNAPSHOT'
version = '2.0.0-SNAPSHOT'
group = 'org.codehaus.groovy'

apply plugin: 'com.github.ben-manes.versions'
Expand Down Expand Up @@ -74,10 +72,10 @@ buildScan {

ext {
androidPluginVersion = androidPluginVersion
buildToolsVersion = '25.0.3'
compileSdkVersion = 25
buildToolsVersion = '26.0.2'
compileSdkVersion = 26
spockVersion = '1.1-groovy-2.4'
androidSupportTestVersion = '0.5'
androidSupportTestVersion = '1.0.1'
groovyVersion = '2.4.12'
}

Expand Down
3 changes: 2 additions & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ apply plugin: 'idea'
apply from: '../gradle/versionFile.gradle'

ext {
androidGradleVersion = '2.3.3'
androidGradleVersion = '3.0.0'
}

repositories {
jcenter()
google()
}

dependencies {
Expand Down
5 changes: 5 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2G -Dfile.encoding=UTF-8 -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configureondemand=true
2 changes: 1 addition & 1 deletion gradle/codenarc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
project.apply plugin: "codenarc"

dependencies {
codenarc 'org.codenarc:CodeNarc:0.27.0'
codenarc 'org.codenarc:CodeNarc:1.0'
}

codenarc {
Expand Down
68 changes: 0 additions & 68 deletions gradle/extraAndroidTasks.gradle

This file was deleted.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-all.zip
19 changes: 12 additions & 7 deletions groovy-android-gradle-plugin/gradle-plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'nebula.optional-base'

apply from: "$rootDir/gradle/publishing.gradle"
apply from: "$rootDir/gradle/bintray.gradle"
apply from: "$rootDir/gradle/artifactory.gradle"
Expand All @@ -30,13 +30,14 @@ sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6

dependencies {
compile localGroovy()
compile gradleApi()
implementation localGroovy()
implementation gradleApi()

compile "com.android.tools.build:gradle:$androidPluginVersion", optional
implementation "com.android.tools.build:gradle:$androidPluginVersion"

testCompile gradleTestKit()
testCompile "org.spockframework:spock-core:$spockVersion", {
testImplementation gradleTestKit()
testImplementation "com.android.tools.build:gradle:3.0.0"
testImplementation "org.spockframework:spock-core:$spockVersion", {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
}
Expand All @@ -54,7 +55,11 @@ task release {
dependsOn fullTest, artifactoryPublish, bintrayUpload, publishPlugins, rootProject.tasks.tagRelease
}

tasks.withType(Test) {
test {
doFirst {
maxParallelForks 1
}

systemProperty 'androidPluginVersion', androidPluginVersion
systemProperty 'buildToolsVersion', buildToolsVersion
systemProperty 'compileSdkVersion', compileSdkVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package groovyx

import groovy.transform.PackageScope
import groovyx.internal.AndroidGroovySourceSetFactory
import org.gradle.api.Action
import org.gradle.api.NamedDomainObjectContainer
Expand Down Expand Up @@ -107,7 +106,7 @@ class GroovyAndroidExtension {
configClosure.execute(sourceSetsContainer)
}

@PackageScope void configure(GroovyCompile task) {
void configure(GroovyCompile task) {
if (configClosure != null) {
ConfigureUtil.configure(configClosure, task)
}
Expand Down
Loading

0 comments on commit ad97c7c

Please sign in to comment.