Is the person doing the Scala plugin for Gradle aware of this? (I haven't checked the source code, so it may already be done like this.)
-------- Forwarded Message -------- > From: Jorge Ortiz <[email protected]> > To: Razvan Cojocaru <[email protected]> > Cc: [email protected] > Subject: Re: [scala-user] scalac and javac > Date: Tue, 9 Feb 2010 22:19:49 -0800 > > The scalac compiler does not compile Java source to bytecode. It > merely parses Java source in order to get the type information it > needs to compile the Scala source that depends on the Java source. > > The recommended approach is to use a three-pass compile. Run scalac > once on *.scala and *.java files to produce Scala *.class files. Run > javac once on *.java files with Scala *.class files in the classpath > to produce Java *.class files. Run scalac again with the real Java > *.class files in case the Scala compiler made any incorrect > assumptions about them in the first pass. > > This three-pass system is recommended but not necessary. Some people > have reported successful compilations with just two passes. > > --j > > On Tue, Feb 9, 2010 at 6:49 PM, Razvan Cojocaru <[email protected]> > wrote: > > I have a mixed java/scala project. I created a build.xml with > only scalac and > it doesn't really compile the .java classes it doesn't have > to... > > I had to add a javac just as well, to compile those. > > Is this the correct approach? > > <scalac scalacdebugging="true" srcdir="src" > destdir="bin"> > <classpath refid="build.classpath" /> > </scalac> > > <javac srcdir="src" destdir="bin"> > <classpath refid="build.classpath" /> > </javac> > > > > ----- > Razvan Cojocaru, > Work: http://www.sigma-systems.com > Playground: http://wiki.homecloud.ca > Follow me: http://feeds.razie.com/RazvanTech RSS Feed , > http://twitter.com/razie Twitter . > > -- > View this message in context: > http://old.nabble.com/scalac-and-javac-tp27525527p27525527.html > Sent from the Scala - User mailing list archive at Nabble.com. > > -- Russel. ============================================================================= Dr Russel Winder Partner xmpp: [email protected] Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203 41 Buckmaster Road, f: +44 8700 516 084 voip: sip:[email protected] London SW11 1EN, UK m: +44 7770 465 077 skype: russel_winder
signature.asc
Description: This is a digitally signed message part
