Hi Markus,

bi-directional dependencies are always a bit difficult with alternative JVM 
languages but there are two ways to address this:

a) shared interface
The trick is to extract a shared Java interface and compile this in an extra 
(gradle) project, say "shared".
Then you let your core project depend on "shared". You can even split up your 
core project into
"java" and "frege" and let either depend on "shared".
Granted, this is a bit of setup work, but it somewhat models the dependencies 
nicely
and Gradle supports multi-project builds really well.

b) inline Java
You can inline your Java code right inside your Frege module files and they 
will be compiled together
in the same fashion that the Java compiler resolves bidirectional dependencies 
between two Java files.

Please let me know if that works for you.

Cheers
Dierk


> Am 02.09.2017 um 13:09 schrieb 'gulp21' via Frege Programming Language 
> <frege-programming-language@googlegroups.com>:
> 
> Hi,
> 
> I’m trying to port my Frege projects from using makefiles to gradle,
> using the Frege gradle plugin. It works well for pure Frege projects and
> mixed Java and Frege projects in which the Frege code depends on the
> Java code. But now I have a project where Frege code depends on Java
> code and this Java code depends on another Frege file (see [1] for a
> minimal example). I couldn’t figure out how to make this work with the
> Frege gradle plugin, which always wants to compile the Java code first
> (which of course fails because the classes from the Frege code are
> missing). Do you have any advice on how to get this working?
> 
> Regards
> Markus
> 
> [1] https://github.com/mabre/gradle_frege_test
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Frege Programming Language" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to frege-programming-language+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to