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

te.rewrite-gradle.8.40.2.source-code.RewriteGradleProject.groovy Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2021 the original author or authors.
 * 

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *

* https://www.apache.org/licenses/LICENSE-2.0 *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ //file:noinspection UnstableApiUsage import org.gradle.api.Action import org.gradle.api.JavaVersion import org.gradle.api.Project import org.gradle.api.Task import org.gradle.api.artifacts.Dependency import org.gradle.api.artifacts.ExternalDependency import org.gradle.api.artifacts.ProjectDependency import org.gradle.api.artifacts.dsl.DependencyConstraintHandler import org.gradle.api.artifacts.dsl.DependencyHandler import org.gradle.api.file.FileCollection import org.gradle.api.file.FileTree import org.gradle.api.file.FileTreeElement import org.gradle.api.initialization.dsl.ScriptHandler import org.gradle.api.specs.Spec import org.gradle.api.tasks.testing.TestFilter import org.gradle.api.tasks.testing.TestFrameworkOptions import org.gradle.api.tasks.testing.junit.JUnitOptions import org.gradle.api.tasks.testing.junitplatform.JUnitPlatformOptions import org.gradle.api.tasks.testing.testng.TestNGOptions import org.gradle.process.JavaForkOptions import org.gradle.process.ProcessForkOptions interface DependencyHandlerSpec extends DependencyHandler { ProjectDependency project(String path) ProjectDependency project(String path, String configuration) Dependency annotationProcessor(Object... dependencyNotation) Dependency annotationProcessor(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency api(Object... dependencyNotation) Dependency api(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency classpath(Object... dependencyNotation) Dependency classpath(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency compile(Object... dependencyNotation) Dependency compile(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency compileOnly(Object... dependencyNotation) Dependency compileOnly(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency implementation(Object... dependencyNotation) Dependency implementation(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency providedCompile(Object... dependencyNotation) Dependency providedCompile(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency providedRuntime(Object... dependencyNotation) Dependency providedRuntime(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency runtime(Object... dependencyNotation) Dependency runtime(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency runtimeOnly(Object... dependencyNotation) Dependency runtimeOnly(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency runtimeClasspath(Object... dependencyNotation) Dependency runtimeClasspath(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency testCompile(Object... dependencyNotation) Dependency testCompile(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency testCompileOnly(Object... dependencyNotation) Dependency testCompileOnly(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=ExternalDependency) Closure closure) Dependency testImplementation(Object... dependencyNotation) Dependency testImplementation(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency testRuntime(Object... dependencyNotation) Dependency testRuntime(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency testRuntimeOnly(Object... dependencyNotation) Dependency testRuntimeOnly(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency deploy(Object... dependencyNotation) Dependency deploy(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) Dependency earlib(Object... dependencyNotation) Dependency earlib(Object dependencyNotation, @DelegatesTo(strategy=Closure.DELEGATE_ONLY, value= ExternalDependency) Closure closure) void constraints(Action configureAction) } interface RewriteTestSpec { File getWorkingDir() void setWorkingDir(File dir) void setWorkingDir(Object dir) RewriteTestSpec workingDir(Object dir) JavaVersion getJavaVersion() String getExecutable() RewriteTestSpec executable(Object executable) void setExecutable(String executable) void setExecutable(Object executable) Map getSystemProperties() void setSystemProperties(Map properties) RewriteTestSpec systemProperties(Map properties) RewriteTestSpec systemProperty(String name, Object value) FileCollection getBootstrapClasspath() void setBootstrapClasspath(FileCollection classpath) RewriteTestSpec bootstrapClasspath(Object... classpath) String getMinHeapSize() String getDefaultCharacterEncoding() void setDefaultCharacterEncoding(String defaultCharacterEncoding) void setMinHeapSize(String heapSize) String getMaxHeapSize() void setMaxHeapSize(String heapSize) List getJvmArgs() void setJvmArgs(List arguments) void setJvmArgs(Iterable arguments) RewriteTestSpec jvmArgs(Iterable arguments) RewriteTestSpec jvmArgs(Object... arguments) boolean getEnableAssertions() void setEnableAssertions(boolean enabled) boolean getDebug() void setDebug(boolean enabled) void setFailFast(boolean failFast) boolean getFailFast() List getAllJvmArgs() void setAllJvmArgs(List arguments) void setAllJvmArgs(Iterable arguments) Map getEnvironment() RewriteTestSpec environment(Map environmentVariables) RewriteTestSpec environment(String name, Object value) void setEnvironment(Map environmentVariables) RewriteTestSpec copyTo(ProcessForkOptions target) RewriteTestSpec copyTo(JavaForkOptions target) RewriteTestSpec include(String... includes) RewriteTestSpec include(Iterable includes) RewriteTestSpec include(Spec includeSpec) RewriteTestSpec include(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=FileTreeElement) Closure includeSpec) RewriteTestSpec exclude(String... excludes) RewriteTestSpec exclude(Iterable excludes) RewriteTestSpec exclude(Spec excludeSpec) RewriteTestSpec exclude(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=FileTreeElement) Closure excludeSpec) RewriteTestSpec setTestNameIncludePatterns(List testNamePattern) FileCollection getTestClassesDirs() void setTestClassesDirs(FileCollection testClassesDirs) Set getIncludes() RewriteTestSpec setIncludes(Iterable includes) Set getExcludes() RewriteTestSpec setExcludes(Iterable excludes) TestFrameworkOptions options(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=TestFrameworkOptions) Closure testFrameworkConfigure) TestFrameworkOptions options(Action testFrameworkConfigure) void useJUnit() void useJUnit(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=JUnitOptions) Closure testFrameworkConfigure) // delegate void useJUnit(Action testFrameworkConfigure) void useJUnitPlatform() void useJUnitPlatform(Action testFrameworkConfigure) void useTestNG() void useTestNG(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=TestNGOptions) Closure testFrameworkConfigure) void useTestNG(Action testFrameworkConfigure) FileCollection getClasspath() void setClasspath(FileCollection classpath) boolean isScanForTestClasses() void setScanForTestClasses(boolean scanForTestClasses) long getForkEvery() void setForkEvery(Long forkEvery) int getMaxParallelForks() void setMaxParallelForks(int maxParallelForks) FileTree getCandidateClassFiles() void filter(Action action) } interface ScriptHandlerSpec extends ScriptHandler { void repositories(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=RepositoryHandlerSpec) Closure cl) void dependencies(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=DependencyHandlerSpec) Closure cl) } abstract class RewriteGradleProject extends groovy.lang.Script implements Project { Map ext // It would be more correct for ext to delegate to ExtraPropertiesExtension, but StaticTypeCheckingVisitor has problems with that abstract void buildscript(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=ScriptHandlerSpec) Closure cl) abstract void ext(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=Map) Closure cl) abstract void dependencies(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=DependencyHandlerSpec) Closure cl) abstract void plugins(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=PluginSpec) Closure cl) abstract void repositories(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=RepositoryHandlerSpec) Closure cl) abstract void subprojects(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=RewriteGradleProject) Closure cl) abstract void allprojects(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=RewriteGradleProject) Closure cl) abstract void test(@DelegatesTo(strategy=Closure.DELEGATE_ONLY, value=RewriteTestSpec) Closure cl) // @Deprecated(since="7.1.0", replacedBy="org.gradle.api.plugins.JavaPluginExtension") // @see org.gradle.api.plugins.JavaPluginConvention abstract JavaVersion getSourceCompatibility(); abstract void setSourceCompatibility(Object value); abstract void setSourceCompatibility(JavaVersion value); abstract JavaVersion getTargetCompatibility(); abstract void setTargetCompatibility(Object value); abstract void setTargetCompatibility(JavaVersion value); // These functions don't actually exist in the Gradle API, but are syntactic sugar which forward to TaskContainer.create() abstract Task task(Map options) abstract Task task(Map options, Closure configureClosure) abstract Task task(String name, Closure configureClosure) abstract Task task(String name) abstract T task(String name, Class type) abstract T task(String name, Class type, Object... constructorArgs) abstract T task(String name, Class type, Action configuration) abstract void apply(Map args) }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy