-
Notifications
You must be signed in to change notification settings - Fork 1
Gradle Build Script
Mohammad Mahfooz edited this page Mar 11, 2023
·
1 revision
- It applies the Java plugin.
- It defines a group and version for the project.
- It configures the repositories from where the dependencies are resolved. In this case, it's Maven Central.
- It declares the dependencies required to run the tests. This includes JUnit 4, JUnit Jupiter, JUnit Jupiter engine, and MySQL connector.
- It sets the test task to use the JUnit Platform for running tests.
- It defines a new source set called integrationTest that includes the test/IntegrationTests directory as the source directory and test/resources directory as the resources directory.
- It extends the integrationTestCompile and integrationTestRuntime configurations from testCompile and testRuntime, respectively. This ensures that the dependencies required to run integration tests are included in the classpath.
- It defines a new task called integrationTest of type Test. This task uses the integrationTest source set to locate the test classes and resources and sets the classpath accordingly.
- It sets the compileJava task options to use Java version 8.