From 13138b3de0035c0c6267443cab55dc9018114740 Mon Sep 17 00:00:00 2001 From: Balazs Varga Date: Sun, 8 Oct 2017 17:40:46 +0200 Subject: [PATCH] Update README.md --- CHANGELOG.md | 7 +++++++ README.md | 27 ++++++++++++++++----------- plugin/build.gradle | 4 ++-- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1696459..0991365 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## Version 3.0.0 (2017-08-21) [api doc](https://wupdigital.github.io/android-maven-publish/groovydoc/3.0.0/index.html) + +* Supports Gradle 3.4 - 4.1 +* Support api and implementation configurations +* Support custom variant publishing +* useCompileDependencies is deprecated and no effect anymore. + ## Version 2.0.0 (2017-08-08) [api doc](https://wupdigital.github.io/android-maven-publish/groovydoc/2.0.0/index.html) * Supports Gradle 3.4 - 4.0 diff --git a/README.md b/README.md index 74183e0..da069ef 100644 --- a/README.md +++ b/README.md @@ -8,19 +8,19 @@ Modification of the standard Maven Publish plugin to be compatible with android- ## Applying the plugin -``` +```groovy plugins { - id 'digital.wup.android-maven-publish' version '2.0.0' + id 'digital.wup.android-maven-publish' version '3.0.0' } ``` -or- -``` +```groovy buildscript { repositories { jcenter() } dependencies { - classpath 'digital.wup:android-maven-publish:2.0.0' + classpath 'digital.wup:android-maven-publish:3.0.0' } } @@ -37,7 +37,7 @@ The android component is used to determine which aar files to publish, and which Please refer to the standard Maven Publish plugin documentation: https://docs.gradle.org/current/userguide/publishing_maven.html -``` +```groovy publishing { publications { mavenAar(MavenPublication) { @@ -47,15 +47,19 @@ publishing { } ``` -This plugin also fixes [issue](https://github.com/gradle/gradle/issues/1118) by adding a method called `useCompileDependencies`. The method called with a Boolean true parameter will use compile dependencies instead of runtime ones. +If you want publish custom variants: -``` +```groovy publishing { - useCompileDependencies true - publications { - mavenAar(MavenPublication) { - from components.java + android.libraryVariants.all { v -> + + "maven${variant.name.capitalize()}Aar"(MavenPublication) { + from components.findByName("android${v.name.capitalize()}") + groupId 'digital.wup.test-publish' + artifactId 'test-publish' + version "1.0.0-${variant.name}" + } } } } @@ -67,6 +71,7 @@ publishing { | ------------- | ----------- | ----------- | | 1.0.0 | digital.wup:android-maven-publish:1.0.0 | 2.4 - 3.3 | | 2.0.0 | digital.wup:android-maven-publish:2.0.0 | 3.4 - 4.0 | +| 3.0.0 | digital.wup:android-maven-publish:3.0.0 | 3.4 - 4.1 | ## License diff --git a/plugin/build.gradle b/plugin/build.gradle index 037bc79..6f214e7 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -28,8 +28,8 @@ jacocoTestReport { dependencies { compile gradleApi() compile localGroovy() - compileOnly 'com.android.tools.build:gradle:3.0.0-beta6' - testCompile 'com.android.tools.build:gradle:3.0.0-beta6' + compileOnly 'com.android.tools.build:gradle:3.0.0-beta7' + testCompile 'com.android.tools.build:gradle:3.0.0-beta7' testCompile gradleTestKit() testCompile('org.spockframework:spock-core:1.1-groovy-2.4') { exclude module: 'groovy-all'