Development setup



  • I at least want to get an idea of how to set up my computer to be able to do some actual code instead of just map. @LaFayette gave me a link the other day.
    As I am getting started, i installed Eclipse (v4.17.00).
    Next step is to install 'Buildship Gradle Integration' plugin. It looks like it is on version 3.0, and already installed?

    Does that sound right?



  • @ff03k64
    Trevan sent me this, Im not sure if its what you need/want.

    Are you comfortable with cloning the repository and building it locally? If so, you'd be able to test it from my branch.

    Some docs on how to do that can be found at https://github.com/triplea-game/triplea/tree/master/docs/development#getting-started and https://github.com/triplea-game/triplea/blob/master/docs/development/dev-process/local-build-and-testing.md. You don't need the fully lobby setup so you can just run the game-headed instance. That's either "HeadedGameRunner" in the IDE launcher or ./gradlew game-headed:run from the command line.



  • @TheDog The first link is the one that LaFayette gave me. I am trying to work my way through it one step at a time. He had said something about making it clearer as well, so I wanted to really dig into it.

    In the Eclipse setup, the first step is to install the 'Buildship Gradle Integration' plugin. Since it seems to already be installed, i wanted to figure out if that step can be skipped now, or at least clarified to say something about it maybe being installed already.

    Your second link is actually a subpage of your first link too, so I will get to it eventually as well, thanks!



  • @ff03k64 , I use IntelliJ so I haven't done the Eclipse setup. But I would say that if it is already installed, you can go ahead and skip the step.



  • Just adding more info/question to maybe update the install instructions later.

    I am in the eclipse marketplace. Looks like it would be 'Checkstyle Plug-in 8.35.0' for that plug in. Unless I am looking in the wrong place anyway.



  • So next thought. Part of the setup for Eclipse is to activate "Checkstyle" for your project, but the directions have not had me set up the project yet.

    Also, is the SSH key required? I haven't done much with Github before, but I have never needed an SSH key for any of it. So i guess the question is, is that a TripleA project thing? or a Github thing that I never got to the point of using?



  • @ff03k64 said in Development setup:

    Also, is the SSH key required? I haven't done much with Github before, but I have never needed an SSH key for any of it. So i guess the question is, is that a TripleA project thing? or a Github thing that I never got to the point of using?

    SSH key is not required. It is one of the ways to authenticate in git. But if you use the https protocol, that will work.



  • @Trevan Okay, i like that better. What is the best way to clone a project? Via the browser or the desktop app?



  • @ff03k64 said in Development setup:

    @Trevan Okay, i like that better. What is the best way to clone a project? Via the browser or the desktop app?

    There really isn't a best way. It is up to your preference. Since you are using Eclipse, I think it has built in git functionality so you might use that.



  • I am trying to clone it in Eclipse, but it isn't seeming to work for me. What are the advantages of intellij?



  • IntelliJ vs Eclipse is a preference thing. I use IntelliJ at work so I'm more used to it compared to Eclipse.


  • Admin

    • SSH key replaces username and password combination. It is strongly recommended, otherwise you'll be typing your username and password repeatedly. Before any time you start coding, you should always update your source code to match the latest, this requires an authentication, similar if you push code.

    • IntelliJ vs Eclipse is preference, though I think in part it's familiarity too. It's difficult to transition IDE and not being familiar with a new one makes it seem inferior.

    My 2 cents, Eclipse was a best in class for a long time but became too much of a 'platform' and around 2015 lost its position. Intellij is not as old and its development has out-paced eclipse IMO quite a bit and continues . Intellij is now winning "the battle" decisively: https://snyk.io/blog/intellij-idea-dominates-the-ide-market-with-62-adoption-among-jvm-developers/. I transitioned a few years ago after being a long-time eclipse user and have been happy with IDEA.

    • Re: git commands, I generally use terminal for all git commands. You can use the built-in commands of either IDE or go with something like 'sourcetree'. IMO there is no replacement for git CLI, though it does have a learning curve.


  • Trying to setup intellij now. Neither document is particularly good for a relative newb to this.
    What is the file i am suppose to select for this line? https://github.com/triplea-game/triplea/blob/master/docs/development/ide-setup/intellij-setup.md

    heckstyle-IDEA plugin
    
        after install finish configuration in: Other Settings > Checkstyle
        select checkstyle file:
    

    is it part of the settings down below it on that page that i import?

    And the following line makes zero sense to me.

    Save Actions
        configure in settings to add 'final' to local variables and class variables.
    


  • @ff03k64 I don't have anything in "Other Settings > Checkstyle" so I'm not sure what that line is referencing.

    For the "Save Actions", you need to install the "Save Actions" plugins. Once it is installed, go to "Other Settings > Save Actions" and check the "Add final modifier to local variable or parameter except if it is implicit". The line has changed since that document was created. You should try creating a PR with changes for this document. That would be a good first PR to attempt.



  • @Trevan I can't select that setting. In order to select it, i have to activate save actions in some way. There are 3 options, on save, on shortcut, and on batch. Which one do i want?

    Thanks!



  • @ff03k64 I use "on save".



  • @Trevan That was my default thought, thanks. I will try to use it as my first PR as well. Now that i have an idea of what to do.



  • @Trevan Do you have a good intellij guide i can use? Just trying to do simple things, like making this page have numbers instead of bullets. Just something simple. But it doesn't like that new formatting unless I add <br> to the end of each line. I think it is trying to be guess what i want it to do, but it is failing on this one.



  • @ff03k64 That's a markdown file so make sure you are using markdown syntax. A basic syntax guide for markdown can be found at https://www.markdownguide.org/basic-syntax/.



  • @Trevan I will take a look, thanks!


Log in to reply