All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jdroid.gradle.commons.JavaBaseGradlePlugin.groovy Maven / Gradle / Ivy

There is a newer version: 0.18.0
Show newest version
package com.jdroid.gradle.commons

import org.gradle.api.JavaVersion
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.testing.Test

public class JavaBaseGradlePlugin extends BaseGradlePlugin {

	public void apply(Project project) {
		super.apply(project)

		project.afterEvaluate {
			project.tasks.withType(Test) {
				scanForTestClasses = true

				if (!jdroid.getBooleanProp('INTEGRATION_TESTS_ENABLED', true)) {
					exclude jdroid.integrationTestsPattern
				}
			}
		}

		if (org.gradle.api.JavaVersion.current().isJava8Compatible()) {
			project.tasks.withType(org.gradle.api.tasks.javadoc.Javadoc) {
				options.addStringOption('Xdoclint:none', '-quiet')
			}
		}
	}

	protected String getJavaSourceCompatibility() {
		return JavaVersion.VERSION_1_7.toString()
	}
	protected String getJavaTargetCompatibility() {
		return JavaVersion.VERSION_1_7.toString()
	}

	protected Class getExtensionClass() {
		return JavaBaseGradleExtension.class;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy