Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #61 from palantir/module.content.root
Browse files Browse the repository at this point in the history
Fix directory-based IDEA projects
  • Loading branch information
alicederyn authored Apr 10, 2017
2 parents 6665626 + 0b37fbc commit f8853a9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
5 changes: 2 additions & 3 deletions src/main/groovy/org/inferred/gradle/ProcessorsPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,8 @@ class ProcessorsPlugin implements Plugin<Project> {
compilerConfiguration.annotationProcessing.replaceNode{
annotationProcessing() {
profile(default: 'true', name: 'Default', enabled: 'true') {
sourceOutputDir(name: getIdeaSourceOutputDir(project))
sourceTestOutputDir(name: getIdeaSourceTestOutputDir(project))
outputRelativeToContentRoot(value: 'true')
sourceOutputDir(name: '../../../' + getIdeaSourceOutputDir(project))
sourceTestOutputDir(name: '../../../' + getIdeaSourceTestOutputDir(project))
processorPath(useClasspath: 'true')
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,8 @@ public class ProcessorsPluginFunctionalTest {
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true">
<sourceOutputDir name="generated_src"/>
<sourceTestOutputDir name="generated_testSrc"/>
<outputRelativeToContentRoot value="true"/>
<sourceOutputDir name="../../../generated_src"/>
<sourceTestOutputDir name="../../../generated_testSrc"/>
<processorPath useClasspath="true"/>
</profile>
</annotationProcessing>
Expand Down Expand Up @@ -642,9 +641,8 @@ public class ProcessorsPluginFunctionalTest {
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true">
<sourceOutputDir name="generated_src"/>
<sourceTestOutputDir name="generated_testSrc"/>
<outputRelativeToContentRoot value="true"/>
<sourceOutputDir name="../../../generated_src"/>
<sourceTestOutputDir name="../../../generated_testSrc"/>
<processorPath useClasspath="true"/>
</profile>
</annotationProcessing>
Expand Down Expand Up @@ -690,9 +688,8 @@ public class ProcessorsPluginFunctionalTest {
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true">
<sourceOutputDir name="foo"/>
<sourceTestOutputDir name="bar"/>
<outputRelativeToContentRoot value="true"/>
<sourceOutputDir name="../../../foo"/>
<sourceTestOutputDir name="../../../bar"/>
<processorPath useClasspath="true"/>
</profile>
</annotationProcessing>
Expand Down Expand Up @@ -744,7 +741,7 @@ public class ProcessorsPluginFunctionalTest {
def xml = new XmlSlurper().parse(testProjectDirRoot.toPath().resolve("${testProjectDirRoot.name}.ipr").toFile())
def compilerConfiguration = xml.component.findResult { it.@name == "CompilerConfiguration" ? it : null }
def profile = compilerConfiguration.annotationProcessing.profile.findResult { it.@name == "Default" ? it : null }
assertEquals(profile.sourceOutputDir.first().@name, "generated_src")
assertEquals(profile.sourceOutputDir.first().@name, "../../../generated_src")
}

/** @see https://github.com/palantir/gradle-processors/issues/12 */
Expand Down Expand Up @@ -821,9 +818,8 @@ public class ProcessorsPluginFunctionalTest {
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true">
<sourceOutputDir name="generated_src"/>
<sourceTestOutputDir name="generated_testSrc"/>
<outputRelativeToContentRoot value="true"/>
<sourceOutputDir name="../../../generated_src"/>
<sourceTestOutputDir name="../../../generated_testSrc"/>
<processorPath useClasspath="true"/>
</profile>
</annotationProcessing>
Expand Down Expand Up @@ -870,9 +866,8 @@ public class ProcessorsPluginFunctionalTest {
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true">
<sourceOutputDir name="foo"/>
<sourceTestOutputDir name="bar"/>
<outputRelativeToContentRoot value="true"/>
<sourceOutputDir name="../../../foo"/>
<sourceTestOutputDir name="../../../bar"/>
<processorPath useClasspath="true"/>
</profile>
</annotationProcessing>
Expand Down Expand Up @@ -922,9 +917,8 @@ public class ProcessorsPluginFunctionalTest {
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true">
<sourceOutputDir name="generated_src"/>
<sourceTestOutputDir name="generated_testSrc"/>
<outputRelativeToContentRoot value="true"/>
<sourceOutputDir name="../../../generated_src"/>
<sourceTestOutputDir name="../../../generated_testSrc"/>
<processorPath useClasspath="true"/>
</profile>
</annotationProcessing>
Expand Down

0 comments on commit f8853a9

Please sign in to comment.