Contributing to MapTool 1.4

Developer discussion regarding MapTool 1.4

Moderators: dorpond, trevor, Azhrei

Forum rules
Posting now open to all registered forum users.
User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Contributing to MapTool 1.4

Post by JamzTheMan »

FYI, I found this interesting for new users to Git. It doesn't seem very interesting at first but after 10 minutes he really does break things down so you get a better core Git understanding.

https://www.youtube.com/watch?v=3m7BgIvC-uQ
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Contributing to MapTool 1.4

Post by Jagged »

I found that very useful, especially as I may need to give my work team some instruction on Git in the near future.

On a different topic, are the other libraries going to be committed to Git as well? I submitted some Hero System dice changes for 1.3 that just missed the cut off and would like to add them for 1.4, but that requires some changes in the shared dice libraries.
Last edited by Jagged on Wed Apr 15, 2015 9:59 am, edited 1 time in total.

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: Contributing to MapTool 1.4

Post by RPTroll »

I added it to the list
https://docs.google.com/spreadsheets/d/ ... sp=sharing

You might want to send Craig a PM
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Contributing to MapTool 1.4

Post by JamzTheMan »

Craig,
I know you "normalized" the line endings for the source code but could you do a project wide source formatting?

I had to compare my 1.4 source with my Nerps source across the whole project to find any files/changes I was missing from past patches, etc (found a few that Lee submitted but never made it to b91-1.4).

So I formatted the whole project (in Eclipse, it's a right click on the source folder to format all so easy enough). I used the xml preferences that Az posted a while back but we still have a lot of code it looks like that isn't in that format.

Right now I show 563 file changes for my commit which is way off :-) So I'd like to get the Java code formatting standarized in GitHub. (and post the preferences file(s) their as well). I don't care what formatting we choose, it's easy enough to format to my own style while working and format to standard when committing.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: Contributing to MapTool 1.4

Post by RPTroll »

As an aside, I want to put the current change requests/improvements into githup. Will hopefully have time to do that this weekend.
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: Contributing to MapTool 1.4

Post by Craig »

JamzTheMan wrote:Craig,
I know you "normalized" the line endings for the source code but could you do a project wide source formatting?

I had to compare my 1.4 source with my Nerps source across the whole project to find any files/changes I was missing from past patches, etc (found a few that Lee submitted but never made it to b91-1.4).

So I formatted the whole project (in Eclipse, it's a right click on the source folder to format all so easy enough). I used the xml preferences that Az posted a while back but we still have a lot of code it looks like that isn't in that format.

Right now I show 563 file changes for my commit which is way off :-) So I'd like to get the Java code formatting standarized in GitHub. (and post the preferences file(s) their as well). I don't care what formatting we choose, it's easy enough to format to my own style while working and format to standard when committing.
Is that the same preference file that is in build-resources in the github repository (which came from subversion) or a later one?
I am thinking of adding https://github.com/diffplug/spotless to the build for 1.4.0.1, its a bit painful in the respect that the build will actually fail if the formatting is incorrect, but that also has one upside which is it will force people to apply the formatting before testing/submitting patches. (You can apply with just gradle spotlessApply).

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Contributing to MapTool 1.4

Post by Jagged »

I believe Spotless works with Eclipse so I am happy with that. My only request is that we use something wider than 80 characters. I'd prefer "double space" over "tab" for indents too, but don't mind too much on that one ;)

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: Contributing to MapTool 1.4

Post by Craig »

Jagged wrote:I believe Spotless works with Eclipse so I am happy with that. My only request is that we use something wider than 80 characters. I'd prefer "double space" over "tab" for indents too, but don't mind too much on that one ;)
Yes it is just using the formatting preferences file exported from eclipse (in the build-resources directory)

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: Contributing to MapTool 1.4

Post by Craig »

rplib and dicetool have been added to github.
To build them you will need to specify the -PVersion=<version> option.
For example to install the pom into your local repository

Code: Select all

./graldew install -pVersion=1.4.0.1-SNAPSHOT
or

Code: Select all

graldew.bat install -pVersion=1.4.0.1-SNAPSHOT
Use the next version + -SNAPSHOT. If the change is going to create incompatibilities with the current release version then increase the 3rd digit (e.g. 1.4.1.x vs 1.4.0.x)

The maptool build script has also been updated to pick up these versions from the local repository.

The following still need to be migrated
maptool.resource
parser
decktool (I am not sure this is even used though).
clientserver

All the source code in maptools, rplib, and dicetool has been reformatted to match the eclipse preference file in the repo.

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: Contributing to MapTool 1.4

Post by RPTroll »

I know this is inglorious work but thank you for cleaning up and migrating.
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Contributing to MapTool 1.4

Post by JamzTheMan »

Craig wrote:
JamzTheMan wrote:Craig,
I know you "normalized" the line endings for the source code but could you do a project wide source formatting?

I had to compare my 1.4 source with my Nerps source across the whole project to find any files/changes I was missing from past patches, etc (found a few that Lee submitted but never made it to b91-1.4).

So I formatted the whole project (in Eclipse, it's a right click on the source folder to format all so easy enough). I used the xml preferences that Az posted a while back but we still have a lot of code it looks like that isn't in that format.

Right now I show 563 file changes for my commit which is way off :-) So I'd like to get the Java code formatting standarized in GitHub. (and post the preferences file(s) their as well). I don't care what formatting we choose, it's easy enough to format to my own style while working and format to standard when committing.
Is that the same preference file that is in build-resources in the github repository (which came from subversion) or a later one?
I am thinking of adding https://github.com/diffplug/spotless to the build for 1.4.0.1, its a bit painful in the respect that the build will actually fail if the formatting is incorrect, but that also has one upside which is it will force people to apply the formatting before testing/submitting patches. (You can apply with just gradle spotlessApply).
Ya, I don't think it's changed. And I'm perfectly happy with using Spotless or any other forced formatting option. We have to get a handle on proper diffs (i know it'll make your job easier!).

I'm also with Jagged, I prefer a MUCH wider line length than 80 characters. I prefer tab or spaces but I don't really care. I'll probably end up just using my own formatting while in development and then reapply the standard formatting. Just as long as we know what that exact formatting is/should in in Git.

So, if you want to make changes to the standard prefs first before applying, go ahead.

Edit: Oh and <clap> on the rplib addition! Got changes for that one as well...don't suppose you normalized/formatted the code first? :)
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Contributing to MapTool 1.4

Post by Jagged »

We do have a formatting guide. I think Azhrei created it.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Contributing to MapTool 1.4

Post by JamzTheMan »

Jagged wrote:We do have a formatting guide. I think Azhrei created it.
Ya, it's the current preferences file in cvs/git. But I believe it has that 80 col width you don't like ;)
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Contributing to MapTool 1.4

Post by Jagged »

The one I downloaded is 120 and is from one of Azhrei's posts. Now I am going to have to try and find it :(

Phew! Turns out its the sticky post from the Java Programming Info thread:
READ ME before submitting source code patches

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Contributing to MapTool 1.4

Post by JamzTheMan »

Now we just need it ran across all the files in GitHub. You'll find a lot of the older class files don't even use that preferences style so I'm still unable to do a good compare myself...
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

Post Reply

Return to “MapTool 1.4”