-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEVEX-657 Only include licenses of FSM dependencies
- License information is now only collected for FSM dependencies - Fixed an issue where 'developmentOnly' dependencies added through the Spring Boot Gradle plugin could be included in the FSM
- Loading branch information
Showing
20 changed files
with
218 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/test/kotlin/org/gradle/plugins/fsm/tasks/bundling/FSMLibraryTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.gradle.plugins.fsm.tasks.bundling | ||
|
||
import org.assertj.core.api.Assertions.assertThat | ||
import org.gradle.plugins.fsm.FSMPlugin | ||
import org.gradle.testkit.runner.GradleRunner | ||
import org.gradle.testkit.runner.TaskOutcome | ||
import org.junit.jupiter.api.Test | ||
import org.junit.jupiter.api.io.TempDir | ||
import java.io.File | ||
import java.nio.file.Paths | ||
import java.util.zip.ZipFile | ||
|
||
class FSMLibraryTest { | ||
|
||
@Test | ||
fun `webApp libs`(@TempDir testDir: File) { | ||
val resourcesUrl = FSMLibraryTest::class.java.classLoader.getResource("webapp-project") | ||
?: error("test project files not found") | ||
val resourcesPath = Paths.get(resourcesUrl.toURI()) | ||
resourcesPath.toFile().copyRecursively(testDir) | ||
|
||
// Execute the gradle build | ||
val result = GradleRunner.create() | ||
.withProjectDir(testDir) | ||
.withArguments(FSMPlugin.FSM_TASK_NAME) | ||
.withPluginClasspath() | ||
.build() | ||
assertThat(result.task(':' + FSMPlugin.FSM_TASK_NAME)?.outcome).isEqualTo(TaskOutcome.SUCCESS) | ||
|
||
// get result | ||
val fsmFile = testDir.resolve("build/fsm/testproject-webapp-1.0-SNAPSHOT.fsm") | ||
assertThat(fsmFile).exists() | ||
ZipFile(fsmFile).use { zipFile -> | ||
// check contents of lib folder | ||
assertThat(zipFile.getEntry("lib/slf4j-api-2.0.13.jar")).isNotNull | ||
assertThat(zipFile.getEntry("lib/fs-isolated-runtime-5.2.220309.jar")).isNull() | ||
assertThat(zipFile.getEntry("lib/fs-isolated-webrt-5.2.220309.jar")).isNull() | ||
} | ||
} | ||
} |
Oops, something went wrong.