From 600e3f596eea2a9718a287f87f603b1615c24123 Mon Sep 17 00:00:00 2001 From: "Rachel M. Carmena" Date: Sat, 16 May 2020 19:54:08 +0200 Subject: [PATCH] Doc: Update versions and plugin DSL --- docs/docs/README.md | 50 +++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/docs/docs/README.md b/docs/docs/README.md index 51f9095..fb4480e 100644 --- a/docs/docs/README.md +++ b/docs/docs/README.md @@ -22,55 +22,75 @@ To add the Hood plugin dependency on Gradle, you can use: #### Declarative syntax (especially recommended for the Kotlin DSL) +This syntax is possible because Hood is available in [Gradle Plugin Portal](https://plugins.gradle.org/plugin/com.47deg.hood): + ```groovy plugins { - id "com.47deg.hood" version "0.8.0" + id "com.47deg.hood" version "0.8.1" } ``` ```kotlin plugins { - id("com.47deg.hood") version "0.8.0" + id("com.47deg.hood") version "0.8.1" } ``` -Don't forget to add the `pluginManagement` block at the top of your `settings.gradle/.kts` if you are not able to find it: +#### Imperative syntax + +To use plugin through imperative syntax, you need to first add the dependency on the `buildscript`: ```groovy -pluginManagement { +buildscript { repositories { - maven { url "https://dl.bintray.com/47deg/hood" } - gradlePluginPortal() + url "https://plugins.gradle.org/m2/" + } + + dependencies { + classpath "com.47deg:hood:0.8.1" } } ``` ```kotlin -pluginManagement { +buildscript { repositories { - maven("https://dl.bintray.com/47deg/hood") - gradlePluginPortal() + maven("https://plugins.gradle.org/m2/") + } + + dependencies { + classpath("com.47deg:hood:0.8.1") } } ``` -#### Imperative syntax +and then you will be able to add it with `apply`: -To use plugin through imperative syntax, you need to first add the dependency on the `buildscript`: + +```groovy +apply plugin: "com.47deg.hood" +``` + +```kotlin +apply(plugin = "com.47deg.hood") +``` + + +In case of using a SNAPSHOT version, the dependency should use a different repository: ```groovy buildscript { repositories { - maven { url "https://dl.bintray.com/47deg/hood" } + url "https://oss.jfrog.org/artifactory/oss-snapshot-local/" } dependencies { - classpath "com.47deg:hood:0.8.0" + classpath "com.47deg:hood:0.8.2-SNAPSHOT" } } ``` @@ -78,11 +98,11 @@ buildscript { ```kotlin buildscript { repositories { - maven("https://dl.bintray.com/47deg/hood") + maven("https://oss.jfrog.org/artifactory/oss-snapshot-local/") } dependencies { - classpath("com.47deg:hood:0.8.0") + classpath("com.47deg:hood:0.8.2-SNAPSHOT") } } ```