diff --git a/build.gradle b/build.gradle index a0c0d7e..78bea37 100644 --- a/build.gradle +++ b/build.gradle @@ -1,39 +1,3 @@ -class FilteringDependenciesExtention { - - /** - * example for 'library': - *
- * [lib: 'org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT', - * exclude: [ - * 'com.google.code.gson:gson', - * 'com.googlecode.json-simple:json-simple' - * ]] - *- * - * @param library see example - */ - def filter(library) { - Object[] result = new Object[2] - result[0] = library.lib - result[1] = { - library.exclude.each { String excludeLibStr -> - String[] excludeLib = excludeLibStr.split(':') - exclude group: excludeLib[0], module: excludeLib[1] - } - } - - return result - } -} - -class FilteringDependenciesPlugin implements Plugin
+ * [lib: 'org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT', + * exclude: [ + * 'com.google.code.gson:gson', + * 'com.googlecode.json-simple:json-simple' + * ]] + *+ * + * @param library see example + */ + def filter(library) { + Object[] result = new Object[2] + result[0] = library.lib + result[1] = { + library.exclude.each { String excludeLibStr -> + String[] excludeLib = excludeLibStr.split(':') + exclude group: excludeLib[0], module: excludeLib[1] + } + } + + return result + } +} diff --git a/buildSrc/src/main/groovy/FilteringDependenciesPlugin.groovy b/buildSrc/src/main/groovy/FilteringDependenciesPlugin.groovy new file mode 100644 index 0000000..5aa04b7 --- /dev/null +++ b/buildSrc/src/main/groovy/FilteringDependenciesPlugin.groovy @@ -0,0 +1,10 @@ +import org.gradle.api.Plugin +import org.gradle.api.Project + +class FilteringDependenciesPlugin implements Plugin