generated from gradle/gradle-issue-reproducer
-
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.
- Loading branch information
1 parent
4cdd48c
commit 26675eb
Showing
13 changed files
with
178 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,57 @@ | ||
| :memo: | There is a matching reproducer for the Groovy DSL [here](https://github.com/gradle/gradle-issue-reproducer/tree/groovy-dsl) | | ||
|---|---| | ||
|
||
# Gradle issue reproducer | ||
|
||
This is template repository to create reproducer projects for Gradle issues. | ||
The template contains a GitHub Action definition that runs a Gradle build upon each code change. | ||
To quickly learn how it works check the following screencast: | ||
|
||
https://user-images.githubusercontent.com/419883/147940456-d0c96c90-f2b5-4574-8133-09647db9545a.mov | ||
|
||
## How to use the template | ||
|
||
- Fork this repository | ||
- On the main page click the `Use this Template` button | ||
- Specify the user/org name and a repository name | ||
- Select `Public` for repository type | ||
- Select `Include all branches` | ||
- Click `Create Repositorty from template` | ||
- Modify the project in the repository to reproduce the issue | ||
- You can clone your new forked repository locally and push changes, as usual | ||
- You can also edit your reprocer in an online editor by replacing `github.com` with `github.dev` in the URL (or by pressing the '.' key on the keyboard). | ||
- Adjust the [GitHub Action file](.github/workflows/run-reproducer.yml) | ||
- You can configure the executed Gradle tasks as well as the environment (task options, log level, JVM version, operating system, etc) | ||
- The documentation for the Gradle GitHub Action is available [here](https://github.com/gradle/gradle-build-action) | ||
- Verify that the reproducer exhibits the problem on the [GitHub Action page](https://github.com/gradle/gradle-issue-reproducer/actions) | ||
- Link your reproducer to the issue | ||
# Bug Reproducer | ||
|
||
## Task 1 | ||
|
||
Run | ||
|
||
```shell | ||
gradlew :project-1:bootRun | ||
``` | ||
|
||
### Expected | ||
|
||
``` | ||
FAILURE: Build failed with an exception. | ||
* What went wrong: | ||
Execution failed for task ':project-1:bootRun'. | ||
> Process 'command 'C:\Program Files\Eclipse Adoptium\jdk-21.0.0.35-hotspot\bin\java.exe'' finished with non-zero exit value 1 | ||
``` | ||
|
||
### Actual | ||
|
||
``` | ||
FAILURE: Build failed with an exception. | ||
* What went wrong: | ||
org/springframework/boot/gradle/tasks/run/BootRun | ||
> org.springframework.boot.gradle.tasks.run.BootRun | ||
``` | ||
|
||
## Task 2 | ||
|
||
Run | ||
|
||
```shell | ||
gradlew :project-2:bootRun | ||
``` | ||
|
||
### Expected | ||
|
||
``` | ||
FAILURE: Build failed with an exception. | ||
* What went wrong: | ||
Execution failed for task ':project-1:bootRun'. | ||
> Process 'command 'C:\Program Files\Eclipse Adoptium\jdk-21.0.0.35-hotspot\bin\java.exe'' finished with non-zero exit value 1 | ||
``` | ||
|
||
### Actual | ||
|
||
``` | ||
FAILURE: Build failed with an exception. | ||
* What went wrong: | ||
org/springframework/boot/gradle/tasks/run/BootRun | ||
> org.springframework.boot.gradle.tasks.run.BootRun | ||
``` |
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,11 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compileOnly("org.springframework.boot:spring-boot-gradle-plugin:3.2.2") | ||
} |
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,5 @@ | ||
import org.springframework.boot.gradle.tasks.run.BootRun | ||
|
||
tasks.withType<BootRun>().configureEach { | ||
jvmArguments.add("-broken") | ||
} |
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 @@ | ||
// To provide Version Catalog |
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,20 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
gradlePlugin { | ||
plugins { | ||
create("plugin-2") { | ||
id = "plugin-2" | ||
implementationClass = "Plugin2" | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compileOnly("org.springframework.boot:spring-boot-gradle-plugin:3.2.2") | ||
} |
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,14 @@ | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.kotlin.dsl.withType | ||
import org.springframework.boot.gradle.tasks.run.BootRun | ||
|
||
open class Plugin2 : Plugin<Project> { | ||
|
||
override fun apply(project: Project) { | ||
project.tasks.withType<BootRun>().configureEach { | ||
jvmArgs("-broken") | ||
} | ||
} | ||
|
||
} |
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,14 @@ | ||
plugins { | ||
java | ||
|
||
id("org.springframework.boot") version "3.2.2" | ||
id("plugin-1") | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("org.springframework.boot:spring-boot-starter-web:3.2.2") | ||
} |
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,7 @@ | ||
pluginManagement { | ||
includeBuild("../plugin-1") | ||
} | ||
|
||
plugins { | ||
id("versions") | ||
} |
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,13 @@ | ||
package project; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class Application { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(Application.class, args); | ||
} | ||
|
||
} |
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,14 @@ | ||
plugins { | ||
java | ||
|
||
id("org.springframework.boot") version "3.2.2" | ||
id("plugin-2") | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("org.springframework.boot:spring-boot-starter-web:3.2.2") | ||
} |
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,3 @@ | ||
pluginManagement { | ||
includeBuild("../plugin-2") | ||
} |
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,13 @@ | ||
package project; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class Application { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(Application.class, args); | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1 +1,7 @@ | ||
rootProject.name = "reproducer-project" | ||
|
||
includeBuild("plugin-1") | ||
includeBuild("plugin-2") | ||
|
||
includeBuild("project-1") | ||
includeBuild("project-2") |