Skip to content

Conversation

santakadev
Copy link
Contributor

@santakadev santakadev commented Mar 7, 2022

Upgrade skeleton to Java 17 LTS version

@santakadev santakadev force-pushed the upgrade-to-java-17-lts branch 4 times, most recently from 87fa801 to 252cfa8 Compare March 7, 2022 10:41
Comment on lines +11 to +12
implementation 'org.apache.logging.log4j:log4j-core:2.17.0'
implementation 'com.vlkan.log4j2:log4j2-logstash-layout:1.0.5'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove log4j libraries from the skeleton. Is there any reason to keep them?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup!

I would vote for maintaining it 😬👼

Reasons why:

  • Used in the bast majority of Java projects, so highly probable to be needed just after cloning the skeleton
  • Useful for Java ecosystem newcomers in order to do not miss logs from libraries you can be actually using which, because of not having a main logger, would not have a visible output for you
  • Consistency with the rest of skeletons where yo have an easy way to log things out
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! ❤️

Those are good reasons for maintaining log4j, so let's keep them 🙃

I thought it might be some dependencies that we forgot to remove 😅

Comment on lines +3 to +4
sourceCompatibility = 17
targetCompatibility = 17
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure it these variables are something that Gradle needs. If they are not needed, I'd remove them.

Copy link
Member

@JavierCane JavierCane Mar 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on Gradle docs:

sourceCompatibility: Java version compatibility to use when compiling Java source. Default value: version of the current JVM in use.
?
targetCompatibility: Java version to generate classes for. Default value: sourceCompatibility.

So, my votes would go for:

  • Maintain sourceCompatibility as it explicitly states the Java version to use while compiling instead of delegating it implicitly. Why: We would like to throw an error otherwise making it worth it to mention that the actual environment does not match the expected one.
  • Maintain targetCompatibility because it acquiring the sourceCompatibility value by default does not seems like an easy assumption (at least in my case). However, I do not have any other reason apart from personal opinions here, so feel free to delete it if you prefer 😊
README.md Outdated
Comment on lines 17 to 18
1. Install Java 17: `brew cask install corretto` or download it [here](https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html)
2. Set it as your default JVM: `export JAVA_HOME='/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home'`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Future improvement: Linux, Windows and Docker setup.

(I don't want to put effort on this right now 😬)

@santakadev santakadev marked this pull request as ready for review March 7, 2022 10:51
Copy link
Member

@JavierCane JavierCane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor improvements 😊

Decide what you prefer and go ahead merging it 🙌🚀

Co-authored-by: Javier Ferrer <javier.mailserio@gmail.com>
@rgomezcasas rgomezcasas merged commit 317f914 into main May 4, 2022
@rgomezcasas rgomezcasas deleted the upgrade-to-java-17-lts branch May 4, 2022 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants