Restructure the code to enforce separation of plugin logic and tasks
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.buildinfo;
|
||||
package org.springframework.boot.gradle.dsl;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
@@ -25,13 +25,14 @@ import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.gradle.tasks.buildinfo.BuildInfo;
|
||||
import org.springframework.boot.gradle.testkit.GradleBuild;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link BuildInfo} created using the
|
||||
* {@link org.springframework.boot.gradle.SpringBootExtension DSL}.
|
||||
* {@link org.springframework.boot.gradle.dsl.SpringBootExtension DSL}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.dependencymanagement;
|
||||
package org.springframework.boot.gradle.plugin;
|
||||
|
||||
import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.Rule;
|
||||
@@ -25,11 +25,12 @@ import org.springframework.boot.gradle.testkit.GradleBuild;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Integration tests for the plugin's dependency management features.
|
||||
* Integration tests for the configuration applied by
|
||||
* {@link DependencyManagementPluginAction}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
public class DependencyManagementIntegrationTests {
|
||||
public class DependencyManagementPluginActionIntegrationTests {
|
||||
|
||||
@Rule
|
||||
public GradleBuild gradleBuild = new GradleBuild();
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.buildinfo;
|
||||
package org.springframework.boot.gradle.tasks.buildinfo;
|
||||
|
||||
import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.Rule;
|
||||
@@ -25,7 +25,7 @@ import org.springframework.boot.gradle.testkit.GradleBuild;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link BuildInfo}.
|
||||
* Integration tests for the {@link BuildInfo} task.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.bundling;
|
||||
package org.springframework.boot.gradle.tasks.bundling;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.bundling;
|
||||
package org.springframework.boot.gradle.tasks.bundling;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.bundling;
|
||||
package org.springframework.boot.gradle.tasks.bundling;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link BootJar}.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.bundling;
|
||||
package org.springframework.boot.gradle.tasks.bundling;
|
||||
|
||||
/**
|
||||
* Tests for {@link BootJar}.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.bundling;
|
||||
package org.springframework.boot.gradle.tasks.bundling;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link BootJar}.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.bundling;
|
||||
package org.springframework.boot.gradle.tasks.bundling;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.jar.JarFile;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.bundling;
|
||||
package org.springframework.boot.gradle.tasks.bundling;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.bundling;
|
||||
package org.springframework.boot.gradle.tasks.bundling;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.bundling;
|
||||
package org.springframework.boot.gradle.tasks.bundling;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.gradle.run;
|
||||
package org.springframework.boot.gradle.tasks.run;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -30,7 +30,7 @@ import org.springframework.util.FileSystemUtils;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link BootRun}.
|
||||
* Integration tests for the {@link BootRun} task.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@@ -8,7 +8,7 @@ def property(String name, Object defaultValue) {
|
||||
project.hasProperty(name) ? project.getProperty(name) : defaultValue
|
||||
}
|
||||
|
||||
task buildInfo(type: org.springframework.boot.gradle.buildinfo.BuildInfo) {
|
||||
task buildInfo(type: org.springframework.boot.gradle.tasks.buildinfo.BuildInfo) {
|
||||
destinationDir file(property('buildInfoDestinationDir', project.buildDir))
|
||||
projectArtifact property('buildInfoProjectArtifact', 'foo')
|
||||
projectVersion property('buildInfoProjectVersion', '1.0')
|
||||
Reference in New Issue
Block a user