Skip to content

Instantly share code, notes, and snippets.

@osscontributor
Created August 5, 2014 19:17
Show Gist options
  • Save osscontributor/d4b48dd3022047c2a7d0 to your computer and use it in GitHub Desktop.
Save osscontributor/d4b48dd3022047c2a7d0 to your computer and use it in GitHub Desktop.
Demonstrating bi-directional dependencies between Groovy and Java
joint_compile $ ls
FirstGroovy.groovy FirstJava.java SecondGroovy.groovy SecondJava.java
joint_compile $ cat FirstGroovy.groovy
class FirstGroovy {
FirstJava firstJava
}
joint_compile $ cat FirstJava.java
public class FirstJava {
SecondGroovy secondGroovy;
}
joint_compile $ cat SecondGroovy.groovy
class SecondGroovy {
FirstJava firstJava
FirstGroovy firstGroovy
SecondJava secondJava
}
joint_compile $ cat SecondJava.java
public class SecondJava {
SecondGroovy secondGroovy;
}
joint_compile $ groovyc *
joint_compile $
joint_compile $ ls
FirstGroovy.class FirstGroovy.groovy FirstJava.class FirstJava.java SecondGroovy.class SecondGroovy.groovy SecondJava.class SecondJava.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment