Trouble Importing libgdx project from github. - java

I built a libgdx project on my desktop which I can build and run properly though I want some friends to work on the project with me and when they import the repository from github the project won't run and it loses the gradle build.
I have tried to use these gradle commands to rebuild the project with no success.
cd/(File path)
gradle build
gradle eclipse
After I try to do these commands eclipse loses the project file. Even if I copy my master file into the imported directory it doesn't work.
Does anyone has suggestions on how to fix this?
Thanks in advance.

What do you mean with "it loses the gradle build"?
Try using ./gradlew (or gradlew on Windows) instead of gradle. The Gradle Wrapper scripts use arcane magic no mortal presumes to understand, but they seem to have their purpose.

Related

How to run an eclipse project without eclipse

I don't have eclipse installed. I have a Java project with an eclipse folder in it.
Can I simulate pressing the Run button in eclipse, without installing eclipse.
I want to run this project.
I am on macOS. It's a pretty huge project, I am not sure how to compile the source correctly. I also don't know what external dependencies this project has.
Without an external build tool to help with building the application like Gradle or Maven, you're going to have to download a copy of Eclipse and run it from there. You'll also need to take the time to ensure that you convert your project to either a Maven or Gradle-based project so that you can build it independent of what IDE you're using.

How to export a java project from eclipse that contains all libraries required to compile?

For a project I completed a game in Java on Eclipse using LibGDX. I now need to turn in the source code to my professor. When I export the project and try opening it on a new computer, about a dozen libraries are missing.
I would like to export my entire project so that when the project is opened in eclipse, it will still compile. Is there any way to do this? I know that runnable jars come with the .jar files of the dependencies and no source code, but I need both.
Thanks in advance
Libgdx required number of dependent jars so it's hard to manually add all jars into project.
Make your project gradle based so that When you import your project through gradle into another System then gradle do most of your task* for you.
*gradle try to find dependent jars in file system if already exist then link with your project if not then it download from given repository and link them in your project. Make sure your system is connected with internet when you build your project.
I highly encourage to use Android Studio or IntelliJIDEA.
On window, by default all jars are stored inside
C:\Users\User_name\.gradle\caches\modules-2\files-2.1
In Mac OSX
/Users/User_name/.gradle/caches/modules-2/files-2.1
When you want to deploy or packaging for the desktop run this command on your IDE terminal.
gradlew desktop:dist
You can use maven or gradle to build your project, take a look of one of the tool and it's won't take you too much time. these tool could help you define your own way for build
A much easier way you could use "fat jar". this is an old tool for build a jar with all lib you need and could be run in any place.

IntelliJ Idea doesn't create manifest.mf, pom.xml, pom.properties

I am quite new to Java, although I worked with some projects. I use IntelliJ IDEA, and I have issue with my web project.
Whenever I RUN the project from IntelliJ and when it's made and built - my localizations texts are not shown, but everything is ok if I use mvn install and deploy the war file manually.
What I found is that jars built with IntelliJ don't have MANIFEST.MF generated and couple of other files.
This is IntelliJ jar
This is jar when I run mvn install from console:
Can somebody help with this, why this happens? I have same maven used for compiling as I use for console run:
If you have a Maven project, then you can choose one on the tasks on the right of the editor.
jar or package should generate a JAR file.
Maven is a software tool that helps manage a project and automate builds. By default, however you have to select Maven as the desired type of project when you go to create a new project.
Basically, create a Maven project! :)

Using gradle in Eclipse

I'm trying to use gradle in Eclipse.
Here's what I did, I installed "Gradle Integration for Eclipse" and "Buildship Gradle Integration".
After that I tried importing my project like so:
But my project now only exists out of some generated files, not my actual project...
All I want is have Gradle import the libs for me. I appreciate any help.

Trouble importing gradle project (LibGdx) in eclipse from git repo

I am trying to set up a git repo to use for a project I would like to start working on. I have created an online repo on GitHub for the project. The project is a LibGdx project using a gradle configuration.
https://github.com/RiverFloater/MathTutorApplication
I can clone the repo to the computer with out any issues. When I go to import it to eclipse I can not get the project to run. I have tried importing different ways with no success. I have imported as a gradle project from the local repo created after cloning. I have also tried as a general project but that fails as well. The import will complete and the files will be displayed but I can not run the project.
The project runs fine on the computer I created it on and can commit with out any issues. Unfortunately, I am new to git and I am not sure what I am doing wrong. Any assistance would be appreciated. If it is a problem with the gradle configuration then I will have to do more research as the gradle wrapper was done using the LibGdx project creator and will have to familiarize my self with that as that is new to me as well.
Thank you in advance.
Well I finally resolved the issue. I didn't commit and push the rest of the gradle configurations and dependencies to the repo. Therefor, when I would pull it was missing the proper configurations to build out the gradle

Categories