Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-1190

Gradle groovy plugin and joint compilation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Won't Fix
    • Affects Version/s: 0.9
    • Fix Version/s: None

      Description

      Hi I have following interface in folder: src/main/java/info/sargis/gedi/InterchangeMessage.java

      package info.sargis.gedi;

      import info.sargis.gedi.model.FunctionalGroupPayload;
      import info.sargis.gedi.model.InterchangePayload;
      import info.sargis.gedi.model.MessagePayload;
      import info.sargis.gedi.model.UserSegment;

      public interface InterchangeMessage

      { String getEol(); String getCompDataSeparator(); String getDataElemSeparator(); String getDecimalNotation(); String getReleaseIndicator(); String getReserved(); String getSegmentTerminator(); InterchangePayload createInterchangePayload(); FunctionalGroupPayload createFunctionalGroupPayload(); MessagePayload createMessagePayload(); UserSegment createUserSegment(String tagName); }

      here is my class referred in InterchangeMessage interface

      src/main/groovy/info/sargis/gedi/model/InterchangePayload.groovy
      src/main/groovy/info/sargis/gedi/model/MessagePayload.groovy
      src/main/groovy/info/sargis/gedi/model/FunctionalGroupPayload.groovy
      src/main/groovy/info/sargis/gedi/model/UserSegment.groovy

      here is build.gradle

      apply plugin: 'idea'
      apply plugin: 'code-quality'
      apply plugin: 'groovy'

      sourceCompatibility = 1.6

      repositories {
      mavenCentral()
      }

      dependencies {
      groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.7.5'
      groovy group: 'org.slf4j', name: 'slf4j-api', version: '1.6.1'

      testCompile group: 'org.testng', name: 'testng', version: '5.14.1'
      testRuntime group: 'ch.qos.logback', name: 'logback-core', version: '0.9.26'
      testRuntime group: 'ch.qos.logback', name: 'logback-classic', version: '0.9.26'
      }

      test {
      useTestNG()
      }

      and here is error:

      sargis@sargis:~/sources/gedi> gradle clean build
      :clean
      :compileJava
      /home/sargis/sources/gedi/src/main/java/info/sargis/gedi/InterchangeMessage.java:3: cannot find symbol
      symbol : class FunctionalGroupPayload
      location: package info.sargis.gedi.model
      import info.sargis.gedi.model.FunctionalGroupPayload;
      ^
      /home/sargis/sources/gedi/src/main/java/info/sargis/gedi/InterchangeMessage.java:4: cannot find symbol
      symbol : class InterchangePayload
      location: package info.sargis.gedi.model
      import info.sargis.gedi.model.InterchangePayload;
      ^
      /home/sargis/sources/gedi/src/main/java/info/sargis/gedi/InterchangeMessage.java:5: cannot find symbol
      symbol : class MessagePayload
      location: package info.sargis.gedi.model
      import info.sargis.gedi.model.MessagePayload;
      ^
      /home/sargis/sources/gedi/src/main/java/info/sargis/gedi/InterchangeMessage.java:6: cannot find symbol
      symbol : class UserSegment
      location: package info.sargis.gedi.model
      import info.sargis.gedi.model.UserSegment;
      ^
      /home/sargis/sources/gedi/src/main/java/info/sargis/gedi/InterchangeMessage.java:31: cannot find symbol
      symbol : class InterchangePayload
      location: interface info.sargis.gedi.InterchangeMessage
      InterchangePayload createInterchangePayload();
      ^
      /home/sargis/sources/gedi/src/main/java/info/sargis/gedi/InterchangeMessage.java:33: cannot find symbol
      symbol : class FunctionalGroupPayload
      location: interface info.sargis.gedi.InterchangeMessage
      FunctionalGroupPayload createFunctionalGroupPayload();
      ^
      /home/sargis/sources/gedi/src/main/java/info/sargis/gedi/InterchangeMessage.java:35: cannot find symbol
      symbol : class MessagePayload
      location: interface info.sargis.gedi.InterchangeMessage
      MessagePayload createMessagePayload();
      ^
      /home/sargis/sources/gedi/src/main/java/info/sargis/gedi/InterchangeMessage.java:37: cannot find symbol
      symbol : class UserSegment
      location: interface info.sargis.gedi.InterchangeMessage
      UserSegment createUserSegment(String tagName);
      ^
      8 errors

      FAILURE: Build failed with an exception.

      • Where:
        Build file '/home/sargis/sources/gedi/build.gradle'
      • What went wrong:
        Execution failed for task ':compileJava'.
        Cause: Compile failed; see the compiler error output for details.
      • Try:
        Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.

      BUILD FAILED

      Total time: 5.344 secs
      sargis@sargis:~/sources/gedi>

      Please note I am able to compile/build my project with IntelliJ

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            armsargis Sargis Harutyunyan
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: