Skip to content
Permalink
Browse files

Improved: Use the Gradle Plugin DSL (OFBIZ-10700)

Since Gradle 2.1 it is recommended to use the ‘plugins {}’ block for
binary plugins instead of the “traditional” ‘apply()’ method.  See [1]
for more details.

[1] https://docs.gradle.org/current/userguide/plugins.html


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854595 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Mar 1, 2019
1 parent 1a33ae3 commit 1bf64250cade6670593bd22e41111a5a69e3b92c
Showing with 21 additions and 33 deletions.
  1. +21 −33 build.gradle
@@ -23,22 +23,28 @@ import org.asciidoctor.gradle.AsciidoctorTask
/* ========================================================
* Project setup
* ======================================================== */
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'at.bxm.gradleplugins:gradle-svntools-plugin:latest.release'
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.8.1' // Rather than using 1.5.9.2 see OFBIZ-10693
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16'
plugins {
id 'java'
id 'groovy'
id 'eclipse'
id 'maven-publish'
id 'at.bxm.svntools' version '2.2.1'
id 'org.asciidoctor.convert' version '1.5.8.1' // Rather than using 1.5.9.2 see OFBIZ-10693
}

/* OWASP plugin
*
* If project property "enableOwasp" is flagged then
* gradle will download required dependencies and
* activate Gradle's OWASP plugin and its related tasks.
*
* Syntax: gradlew -PenableOwasp dependencyCheckAnalyze
*/
if (project.hasProperty('enableOwasp')) {
plugins {
id 'org.owasp.dependencycheck' version '3.0.2'
}
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: "at.bxm.svntools"
apply plugin: 'org.asciidoctor.convert'

apply from: 'common.gradle'

@@ -198,6 +204,7 @@ dependencies {
junitReport 'junit:junit:4.12'
junitReport 'org.apache.ant:ant-junit:1.10.5'

asciidoctor 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16'
// bug workaround - see OFBIZ-9873
asciidoctor 'org.jruby:jruby-complete:9.2.4.0'

@@ -311,25 +318,6 @@ eclipse.classpath.file.whenMerged { classpath ->
}
tasks.eclipse.dependsOn(cleanEclipse)

/* OWASP plugin
*
* If project property "enableOwasp" is flagged then
* gradle will download required dependencies and
* activate Gradle's OWASP plugin and its related tasks.
*
* Syntax: gradlew -PenableOwasp dependencyCheckAnalyze
*/
buildscript {
if (project.hasProperty('enableOwasp')) {
dependencies {
classpath 'org.owasp:dependency-check-gradle:3.0.2'
}
}
}
if (project.hasProperty('enableOwasp')) {
apply plugin: 'org.owasp.dependencycheck'
}

/* ========================================================
* Tasks
* ======================================================== */

0 comments on commit 1bf6425

Please sign in to comment.
You can’t perform that action at this time.