gradle: libs.gradle преобразован в gradle-plugin
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
package fildep
|
||||
|
||||
class FilteringDependenciesExtention {
|
||||
|
||||
/**
|
||||
@@ -1,3 +1,5 @@
|
||||
package fildep
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
|
||||
25
buildSrc/src/main/groovy/libs/LibsExtention.groovy
Normal file
25
buildSrc/src/main/groovy/libs/LibsExtention.groovy
Normal file
@@ -0,0 +1,25 @@
|
||||
package libs
|
||||
|
||||
class LibsExtention {
|
||||
private def junit_version = '5.5.2'
|
||||
|
||||
final def commons_text = 'org.apache.commons:commons-text:1.9'
|
||||
final def lombok = 'org.projectlombok:lombok:1.18.12'
|
||||
final def refobj = 'ru.dmitriymx:reflection-object:1.0-BETA'
|
||||
|
||||
final def bukkit = [lib: 'org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT', exclude: [
|
||||
'com.google.code.gson:gson',
|
||||
'com.googlecode.json-simple:json-simple',
|
||||
'commons-lang:commons-lang',
|
||||
'org.yaml:snakeyaml'
|
||||
]]
|
||||
|
||||
final def test = [
|
||||
junit5: [
|
||||
"org.junit.jupiter:junit-jupiter-api:$junit_version",
|
||||
"org.junit.jupiter:junit-jupiter-engine:$junit_version"
|
||||
],
|
||||
mock : ['org.mockito:mockito-core:1.10.19'],
|
||||
h2db : 'com.h2database:h2:1.4.200'
|
||||
]
|
||||
}
|
||||
12
buildSrc/src/main/groovy/libs/LibsPlugin.groovy
Normal file
12
buildSrc/src/main/groovy/libs/LibsPlugin.groovy
Normal file
@@ -0,0 +1,12 @@
|
||||
package libs
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
|
||||
class LibsPlugin implements Plugin<Project> {
|
||||
|
||||
@Override
|
||||
void apply(Project project) {
|
||||
project.extensions.create('libs', LibsExtention)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user