Commit 3e641655 authored by Christian Meyer's avatar Christian Meyer
Browse files

added ZmtExternalPlugin.groovy

    added test
    added properties file
parent 8b5f751b
package de.zmt.gradle;
import org.gradle.api.*
/**
* Meta plugin applying all necessary plugins for external libraries
* not dependent on zmt-core.
*/
public class ZmtExternalPlugin implements Plugin<Project> {
private static final def CONFIGURE = {
apply(plugin: ZmtBasePlugin)
apply(plugin: ZmtJavaPlugin)
apply(plugin: ZmtPublishPlugin)
}
@Override
void apply(Project project) {
project.configure(project, CONFIGURE)
}
}
implementation-class=de.zmt.gradle.ZmtExternalPlugin
package de.zmt.gradle
import org.gradle.api.*
import org.junit.*
import org.gradle.testfixtures.ProjectBuilder
import static org.junit.Assert.*
class ZmtExternalPluginTest {
@Test
public void apply() {
Project project = ProjectBuilder.builder().build()
project.pluginManager.apply 'de.zmt.library'
project.configure(project) {
assertTrue(plugins.hasPlugin(ZmtBasePlugin.class))
assertTrue(plugins.hasPlugin(ZmtJavaPlugin.class))
assertTrue(plugins.hasPlugin(ZmtPublishPlugin.class))
}
project.evaluate()
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment