Archived
0

убираем LogicPlugin

This commit is contained in:
2021-04-26 14:00:19 +03:00
parent fdc975d268
commit 39b858696f
3 changed files with 18 additions and 34 deletions

View File

@@ -4,7 +4,22 @@
*/
import ru.dmitriymx.gradle.plugin.LibsPlugin
import ru.dmitriymx.gradle.plugin.LogicPlugin
class Logic {
private final Project project
Logic(Project project) {
this.project = project
}
String getProperty1(String propertyName1, String propertyName2) {
return (String) (project.hasProperty(propertyName1) ? project.property(propertyName1) : project.property(propertyName2))
}
String getProperty1(String propertyName) {
return (String) (project.hasProperty(propertyName) ? project.property(propertyName) : null)
}
}
plugins {
id 'java'
@@ -12,7 +27,8 @@ plugins {
}
apply plugin: LibsPlugin
apply plugin: LogicPlugin
def logic = new Logic(project)
project.group = logic.getProperty1('project.group')
project.version = logic.getProperty1('project.version')