From 483fe180ca478177509b1a95c78062adb2b063e8 Mon Sep 17 00:00:00 2001 From: Pavel Dudka Date: Mon, 11 Apr 2016 12:19:22 -0700 Subject: [PATCH 1/4] Updated gradle configs --- app/build.gradle | 2 +- build.gradle | 2 +- gradle.properties | 4 ++++ plugin/gradle.properties | 2 +- plugin/maven-publish.gradle | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0b3466d..e49b633 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,7 +43,7 @@ tasks.matching { it instanceof Test }.all { testLogging.events = ["failed", "passed", "skipped"] } -ext.support_libs_version = '23.1.1' +ext.support_libs_version = '23.3.0' ext.espresso_version = '2.2.1' dependencies { diff --git a/build.gradle b/build.gradle index 9959e5d..ad2cf00 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.0.0-beta5' + classpath 'com.android.tools.build:gradle:2.1.0-alpha5' } } diff --git a/gradle.properties b/gradle.properties index 5a78e68..435d1f4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,6 +17,10 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true +org.gradle.parallel=true +org.gradle.daemon=true +org.gradle.configureondemand=true +org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 GROUP=com.trickyandroid POM_LICENCE_NAME=The Apache Software License, Version 2.0 diff --git a/plugin/gradle.properties b/plugin/gradle.properties index 01b6f80..122a6de 100644 --- a/plugin/gradle.properties +++ b/plugin/gradle.properties @@ -18,7 +18,7 @@ # org.gradle.parallel=true -VERSION_NAME=0.2.1 +VERSION_NAME=0.2.2-SNAPSHOT ARTIFACT_NAME=jacoco-everywhere POM_DESCRIPTION=Gradle plugin which allows to generate Jacoco coverage report for both integration & unit tests diff --git a/plugin/maven-publish.gradle b/plugin/maven-publish.gradle index 1a1e9d3..44ab837 100644 --- a/plugin/maven-publish.gradle +++ b/plugin/maven-publish.gradle @@ -63,6 +63,8 @@ artifacts { archives javadocJar } +//publish to Maven -> ./gradlew uploadArchives + gradle.taskGraph.whenReady { taskGraph -> signArchives.onlyIf { isReleaseBuild() && gradle.taskGraph.getAllTasks().find({ it.name == "uploadArchives" }) != null From 4faf9ea3a32509185816a2db302037d48ca013a2 Mon Sep 17 00:00:00 2001 From: Pavel Dudka Date: Sun, 28 Aug 2016 21:59:22 -0700 Subject: [PATCH 2/4] #8: Migrate to Bintray --- build.gradle | 4 +- gradle.properties | 18 ++-- gradle/wrapper/gradle-wrapper.properties | 4 +- plugin/bintray-publish.gradle | 17 ++++ plugin/build.gradle | 4 +- plugin/gradle.properties | 28 ------ plugin/maven-publish.gradle | 113 ----------------------- 7 files changed, 29 insertions(+), 159 deletions(-) create mode 100644 plugin/bintray-publish.gradle delete mode 100644 plugin/gradle.properties delete mode 100644 plugin/maven-publish.gradle diff --git a/build.gradle b/build.gradle index ad2cf00..14b4e10 100644 --- a/build.gradle +++ b/build.gradle @@ -2,11 +2,11 @@ buildscript { repositories { - mavenLocal() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0-alpha5' + classpath 'com.android.tools.build:gradle:2.2.0-beta1' + classpath 'com.novoda:bintray-release:0.3.4' } } diff --git a/gradle.properties b/gradle.properties index 435d1f4..cabebfa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,17 +22,11 @@ org.gradle.daemon=true org.gradle.configureondemand=true org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +ORG_NAME=trickyandroid GROUP=com.trickyandroid -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo -POM_DEVELOPER_ID=paveldudka -POM_DEVELOPER_NAME=Pavel Dudka - -RELEASE_REPOSITORY_URL = https://oss.sonatype.org/service/local/staging/deploy/maven2/ -SNAPSHOT_REPOSITORY_URL = https://oss.sonatype.org/content/repositories/snapshots/ - -#uncomment this & point to local maven for your local builds -#then whenever you execute "uploadArchive" task, binary will be published to local maven repo -#PUBLISH_REPO_OVERRIDE = file:///Users/paveldudka/.m2/repository +VERSION_NAME=0.2.2 +ARTIFACT_NAME=jacoco-everywhere +POM_DESCRIPTION=Gradle plugin which allows to generate Jacoco coverage report for both integration & unit tests +POM_URL=https://github.com/paveldudka/JacocoEverywhere +POM_NAME=JacocoEverywhere Gradle plugin diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3bf9493..e301dd6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Jan 15 09:53:21 PST 2016 +#Sun Aug 28 14:47:51 PDT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/plugin/bintray-publish.gradle b/plugin/bintray-publish.gradle new file mode 100644 index 0000000..487d9ae --- /dev/null +++ b/plugin/bintray-publish.gradle @@ -0,0 +1,17 @@ +apply plugin: 'com.novoda.bintray-release' + +publish { + userOrg = ORG_NAME + groupId = GROUP + artifactId = ARTIFACT_NAME + publishVersion = VERSION_NAME + bintrayUser = BINTRAY_USER + bintrayKey = BINTRAY_KEY + desc = POM_DESCRIPTION + website = POM_URL + licences = ['Apache-2.0'] +} + +afterEvaluate { + tasks.bintrayUpload.dependsOn('mavenJavadocJar', 'mavenSourcesJar', 'generatePomFileForMavenPublication') +} \ No newline at end of file diff --git a/plugin/build.gradle b/plugin/build.gradle index 62f1819..bd97ed8 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -1,4 +1,5 @@ -apply from:'maven-publish.gradle' +apply plugin: 'java' +apply from: 'bintray-publish.gradle' version = VERSION_NAME group = GROUP @@ -10,4 +11,3 @@ dependencies { compile gradleApi() compile localGroovy() } - diff --git a/plugin/gradle.properties b/plugin/gradle.properties deleted file mode 100644 index 122a6de..0000000 --- a/plugin/gradle.properties +++ /dev/null @@ -1,28 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx10248m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true - - -VERSION_NAME=0.2.2-SNAPSHOT - -ARTIFACT_NAME=jacoco-everywhere -POM_DESCRIPTION=Gradle plugin which allows to generate Jacoco coverage report for both integration & unit tests -POM_URL=https://github.com/paveldudka/JacocoEverywhere -POM_SCM_URL=https://github.com/paveldudka/JacocoEverywhere.git -POM_NAME=JacocoEverywhere Gradle plugin - diff --git a/plugin/maven-publish.gradle b/plugin/maven-publish.gradle deleted file mode 100644 index 44ab837..0000000 --- a/plugin/maven-publish.gradle +++ /dev/null @@ -1,113 +0,0 @@ -apply plugin: 'maven' -apply plugin: 'groovy' -apply plugin: 'signing' - -tasks.matching({ it instanceof Jar }).all { - baseName ARTIFACT_NAME -} - -def isReleaseBuild() { - logger.info("is release buid: ${!VERSION_NAME.contains("SNAPSHOT")}") - return !VERSION_NAME.contains("SNAPSHOT") -} - -def getReleaseRepositoryUrl() { - def result - - if (hasProperty('PUBLISH_REPO_OVERRIDE')) { - result = PUBLISH_REPO_OVERRIDE - } else { - result = RELEASE_REPOSITORY_URL - } - println "release publish repo: $result" - result -} - -def getSnapshotRepositoryUrl() { - def result - - if (hasProperty('PUBLISH_REPO_OVERRIDE')) { - result = PUBLISH_REPO_OVERRIDE - } else { - result = SNAPSHOT_REPOSITORY_URL - } - println "snapshot publish repo: $result" - result -} - -def getRepositoryUsername() { - return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "" -} - -def getRepositoryPassword() { - return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "" -} - -task sourceJar(type: Jar) { - from sourceSets.main.allSource - classifier = 'sources' -} - -task javadocJar(type: Jar, dependsOn: groovydoc) { - classifier = 'javadoc' - from groovydoc.destinationDir -} - -signing { - sign configurations.archives -} - - -artifacts { - archives sourceJar - archives javadocJar -} - -//publish to Maven -> ./gradlew uploadArchives - -gradle.taskGraph.whenReady { taskGraph -> - signArchives.onlyIf { - isReleaseBuild() && gradle.taskGraph.getAllTasks().find({ it.name == "uploadArchives" }) != null - } -} - -uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - pom.groupId = GROUP - pom.artifactId = ARTIFACT_NAME - pom.version = VERSION_NAME - - repository(url: getReleaseRepositoryUrl()) { - authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) - } - snapshotRepository(url: getSnapshotRepositoryUrl()) { - authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) - } - - pom.project { - name POM_NAME - description POM_DESCRIPTION - url POM_URL - licenses { - license { - name POM_LICENCE_NAME - url POM_LICENCE_URL - distribution POM_LICENCE_DIST - } - } - scm { - url POM_SCM_URL - } - developers { - developer { - id POM_DEVELOPER_ID - name POM_DEVELOPER_NAME - } - } - } - - } - } -} \ No newline at end of file From 837531fcd24d97b0adafc2b6c1c7a4afe8ee978e Mon Sep 17 00:00:00 2001 From: Pavel Dudka Date: Sun, 28 Aug 2016 22:11:04 -0700 Subject: [PATCH 3/4] Update version --- gradle.properties | 2 +- plugin/bintray-publish.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index cabebfa..008dd29 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,7 +24,7 @@ org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError - ORG_NAME=trickyandroid GROUP=com.trickyandroid -VERSION_NAME=0.2.2 +VERSION_NAME=0.2.4 ARTIFACT_NAME=jacoco-everywhere POM_DESCRIPTION=Gradle plugin which allows to generate Jacoco coverage report for both integration & unit tests POM_URL=https://github.com/paveldudka/JacocoEverywhere diff --git a/plugin/bintray-publish.gradle b/plugin/bintray-publish.gradle index 487d9ae..89b9fbd 100644 --- a/plugin/bintray-publish.gradle +++ b/plugin/bintray-publish.gradle @@ -13,5 +13,5 @@ publish { } afterEvaluate { - tasks.bintrayUpload.dependsOn('mavenJavadocJar', 'mavenSourcesJar', 'generatePomFileForMavenPublication') + tasks.bintrayUpload.dependsOn('assemble', 'mavenJavadocJar', 'mavenSourcesJar', 'generatePomFileForMavenPublication') } \ No newline at end of file From a5f989dd59b88588ec5cdaacb7bee0b71e778058 Mon Sep 17 00:00:00 2001 From: Pavlo Dudka Date: Mon, 18 Dec 2017 09:02:12 -0800 Subject: [PATCH 4/4] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0f4bb6c..9a50e23 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # JacocoEverywhere Gradle plugin which allows to generate Jacoco coverage report for both integration & unit tests +# Warning! +This plugin is not maintained anymore and is deprecated! + # Why? Android plugin has built-in support for generating test coverage report: