Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Tycho and Kotlin

>However - for our projects whose dependencies are MANIFEST-based and rely on Tycho/OSGi for dependency resolution/target platform 
>computation, I'm wondering if we've hit a roadblock - as Kotlin needs to compile the Java bytecode prior to the other (Tycho/Maven)
> compilers kicking in, but if any of those Kotlin classes depend on the OSGi dependencies, our concern is that it won't be able to resolve 
>them - so it's a bit of a chicken/egg problem.

Tycho injects the resolved OSGi dependencies back into the maven project model so other (non-OSGi aware) maven plugins have access to the OSGi compile classpath. I know that e.g. the PMD and sonar plugins rely on this when run on a Tycho project.
So in principle it should be possible to run another compiler as long as it's getting its compilation classpath from
maven's standard project model 

MavenProject.getCompileClasspathElements()

You could bind this compiler to a phase prior to compile to make sure it runs before tycho-compiler-plugin.
Note that I don't know anything about kotlin so I may be completely wrong.

Regards,
Jan






Back to the top