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
Showing
6 changed files
with
62 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
plugins { | ||
// Applying this plugin casuses build to fail | ||
// comment out line for a successful build | ||
id 'me.champeau.jmh' version '0.6.6' | ||
} | ||
|
||
defaultTasks 'eclipseClasspath' | ||
|
||
allprojects { | ||
apply plugin: 'java-library' | ||
apply plugin: 'eclipse' | ||
} | ||
|
||
dependencies { | ||
// ALSO: change this to testImplementation, testRuntimeOnly, or compileOnly for successful build | ||
testCompileOnly project(':subproject') | ||
} | ||
|
||
def dependencyFound = new boolean[1]; | ||
|
||
eclipse.classpath.file.whenMerged { classpath -> | ||
classpath.entries.each { entry -> | ||
if (entry instanceof org.gradle.plugins.ide.eclipse.model.ProjectDependency) { | ||
println "Found dependency: $entry" | ||
dependencyFound[0] = true | ||
} | ||
} | ||
} | ||
|
||
gradle.buildFinished { | ||
if (!dependencyFound[0]) { | ||
throw new GradleException("The project dependency should have been included in eclipse classpath!"); | ||
} | ||
} |
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,9 @@ | ||
rootProject.name = 'reproducer-project' | ||
|
||
dependencyResolutionManagement { | ||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
|
||
include 'subproject' |
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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry output="bin/main" kind="src" path="src/main/java"> | ||
<attributes> | ||
<attribute name="gradle_scope" value="main"/> | ||
<attribute name="gradle_used_by_scope" value="main,test"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="bin/default"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/> | ||
</classpath> |
Empty file.
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,8 @@ | ||
package pkg; | ||
|
||
public class Test { | ||
|
||
public static String line() { | ||
return "hello"; | ||
} | ||
} |