Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Java build.gradle files with eclipse workaround #717

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ bin/
.project
.settings/
build/
.idea/
14 changes: 14 additions & 0 deletions vscode-wpilib/resources/gradle/java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "###GRADLERIOREPLACE###"
id "eclipse"
}

java {
Expand Down Expand Up @@ -101,3 +102,16 @@ wpi.java.configureTestTasks(test)
tasks.withType(JavaCompile) {
options.compilerArgs.add '-XDstringConcat=inline'
}

// Prevent the eclipse compiler (used by the VS Code extension for intellisense and debugging)
// from generating bad class files from annotation processors like Epilogue
eclipse {
classpath {
containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
file.whenMerged { cp ->
def entries = cp.entries;
def src = new org.gradle.plugins.ide.eclipse.model.SourceFolder('build/generated/sources/annotationProcessor/java/main/', null)
entries.add(src)
}
}
}
14 changes: 14 additions & 0 deletions vscode-wpilib/resources/gradle/javaromi/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "###GRADLERIOREPLACE###"
id "eclipse"
}

java {
Expand Down Expand Up @@ -62,3 +63,16 @@ wpi.java.configureTestTasks(test)
tasks.withType(JavaCompile) {
options.compilerArgs.add '-XDstringConcat=inline'
}

// Prevent the eclipse compiler (used by the VS Code extension for intellisense and debugging)
// from generating bad class files from annotation processors like Epilogue
eclipse {
classpath {
containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
file.whenMerged { cp ->
def entries = cp.entries;
def src = new org.gradle.plugins.ide.eclipse.model.SourceFolder('build/generated/sources/annotationProcessor/java/main/', null)
entries.add(src)
}
}
}
14 changes: 14 additions & 0 deletions vscode-wpilib/resources/gradle/javaxrp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "###GRADLERIOREPLACE###"
id "eclipse"
}

java {
Expand Down Expand Up @@ -61,3 +62,16 @@ wpi.java.configureTestTasks(test)
tasks.withType(JavaCompile) {
options.compilerArgs.add '-XDstringConcat=inline'
}

// Prevent the eclipse compiler (used by the VS Code extension for intellisense and debugging)
// from generating bad class files from annotation processors like Epilogue
eclipse {
classpath {
containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
file.whenMerged { cp ->
def entries = cp.entries;
def src = new org.gradle.plugins.ide.eclipse.model.SourceFolder('build/generated/sources/annotationProcessor/java/main/', null)
entries.add(src)
}
}
}