I'm doing a java project with some friends of mine, using intellij as IDE and gradle to build the project, recently I started learning clojure and I'd like to include Clojure code in our java project, as we know if it was Lein handling the project I coud easely interop both java and clojure with each other, but my friends have no interest in using Clojure or changing the project structure (understandably of course), is there anyway I can keep the development using gradle and intellij without having to compile Clojure into jar and include it has a external dependency? (use gradle so it can build the java and clojure in the same project or something like that)
I already tried finding plugins but I couldnt get it to build the project from intellij has it would keep getting errors... Thanks in advance for the responses.
Related
I have a problem with my scala project.
I try to create a new project with SBT builder but once I create it I am stuck with this message:
sbt: extracting project structure from sbt
I use:
sbt 1.8.0,
scala 2.13.10,
Intellij 2022.2.3,
SDT 1.8/11/17/19
I will be really grateful if someone has any idea how can I solve it.
I tired to use different version of SBT, scala, JDK, installing/uninstalling ItelliJ, removing sbt.boot.lock or importing external sources of sbt and scala. Nothing works.
We have a complex Java Project with many processes/applications. Planning to move from Ant build to Maven or Gradle. Trying to compare the migration process to maven and gradle. Any thoughts and advice? Thanks,
Gradle is your choice. In the future if you want to migrate your app to android, it would be much easier since android studio uses gradle. Also gradle uses groovy, a powerful script language and you can add any java code in your build.gradle.
Disclaimer: This is my personal view, and I am not associated with gradle or maven.
I am an experienced Java developer with years of familarity with Eclipse and Maven.
My goal is to create an android application and I am getting familiar with the latest Development environment Android Studio 2.3.2 which obviously uses Java 8 and Gradle. The app shall share code with an Eclipse based project that uses maven and Swing and is also Java 8 based. I am intending to publish the result as an open source project on github.
I found e.g.
https://github.com/uhafner/android-config as an example but that seems to be outdated.
https://github.com/cgeo/cgeo - which explictly states that eclipse is only used for codewriting/testing
Gradle project for plain Java and Android with single source tree suggests an answer for a gradle only approach that has a tutorial link as an answer (which is not accepted) and no example
https://github.com/javadev/calc which is purely maven driven and has two pom.xml files
https://github.com/adrian/upm-swing and https://github.com/adrian/upm-android simply have copied subdirectories instead of any kind of shared config management
How feasible is a combined maven/gradle project structure?
What would be a proper way to structure the project files to accomplish the above goals?
What are good examples projects that follow a similar approach?
My reason to be reluctant with Gradle and IntelliJ is obvious. It is an unfamiliar environment for me and android is not the main target of my development.
Part of the answer seems be covered at:
Can Android Studio be used to run standard Java projects?
I got somewhat of a success with the project https://github.com/BITPlan/can4eve
but would appreciate some help on the android studio / gradle side of things.
The project also has travis support built in and I am also running nightly Jenkins checks based on maven.
I have googled aplenty, and I find scraps of info here and there, most old, and I haven't found a good answer.
I need to write scala and Java, and I'd like to do so inside the same maven project. I would like to use IntelliJ or Netbeans if that matters, with the latest Scala lib and Java 8.
What is the best way to create a maven project with Scala and Java code in it?
I've seen this but it's kind of old
Maven: mixing Java and Scala in one project
I have an existing java project in Netbeans. I would like to start coding parts of it in Scala. I can add ".scala" files to the project but apparently they aren't compiled.
Can I somehow modify the existing Netbeans project settings in order to build java and scala sources together or do I need to create a new project and import the existing (java) sources?
Thanks
Martin
EDIT Sorry, I forgot to mention: I've installed the Scala-Plugin for netbeans, so compiling scala code is feasible.
I can create a new (Scala) project and add both scala and java sources to it and it compiles perfectly. My question was if (and how) it's possible to migrate an existing "java-only" project towards such a "mixed" project.
I don't think this is possible in the way you want it. You could however write an Ant build-script and let Netbeans execute it when building you application.
Otherwise I suggest to just create a new scala project and import it as *.jar library into your Java application. This keeps your project clean and nicely modularized.
You will need to migrate to use something like Maven to do this for you, as Netbeans doesn't know how to compile Scala code. Maven can be configured to compile the .scala files first then the .java, resulting in your final compiled source.
Have a look here for the maven config.
I would recommend doing a new maven project, Project form Archetype, and use the following.
http://mvnrepository.com/artifact/org.scala-tools.archetypes/scala-archetype-simple/1.3
This basically auto imports you a project all set up to get started running scala in a Java project.