Coder Social home page Coder Social logo

Comments (9)

SmushyTaco avatar SmushyTaco commented on September 10, 2024 1

Understood, being able to have snake case in the gradle.properties and camel case in the build.gradle.kts would be ideal. I'll look into solutions for this in the future for this as I don't want to compromise the actual build file for this. Thanks for bringing this up to me!

from example-mod.

SmushyTaco avatar SmushyTaco commented on September 10, 2024 1

Might have found a solution, going to test it now and if all goes well this issue will be resolved πŸ˜„

from example-mod.

SmushyTaco avatar SmushyTaco commented on September 10, 2024 1

Issue has been resolved! Thanks for bringing this to my attention!

from example-mod.

rapus95 avatar rapus95 commented on September 10, 2024 1

thanks for putting effort into solving this! ☺️

from example-mod.

EnergoStalin avatar EnergoStalin commented on September 10, 2024

Upvote issue. Please consider change naming

from example-mod.

SmushyTaco avatar SmushyTaco commented on September 10, 2024

I'm confused, do you want it changed because of personal preference or is this actually causing issues? If it's causing issues go more in depth on the issue please.

I've decided to use camel case because the build files are in Kotlin and that's the naming convention Kotlin uses. If you explain your reasoning further I'll gladly change it.

from example-mod.

rapus95 avatar rapus95 commented on September 10, 2024

I recently started to dive into building a Minecraft mod and everything is new to me. I generally know programming, but not kotlin. So I went step by step through https://fabricmc.net/wiki/tutorial:setup where it pointed me to this repo for a kotlin mod and said to update the versions for being conform to https://fabricmc.net/develop/ . There's a code area which looks like it has the right format for the gradle file. So I just copied and pasted the text without even noticing that the style changed from camel to snake and I also wasn't sure if the gradle auto migration worked for the kotlin version too. Then it errored and it took me almost 20 mins to understand that copying right from the fabric page corrupted my program. So my suggestion would be to either go conform with the java version or request an integration of kotlin specific instructions on the /develop page.

from example-mod.

rapus95 avatar rapus95 commented on September 10, 2024

I guess the easiest solution would be an indirection in the build file which looks for both tags in the .properties and then moves it to a new variable which is used everywhere.
just out of curiosity, java is a camel case language too, isn't it? How do they solve not compromising their build file?

btw on a side note, is there any way to replace all occurrences of mod_id (which is also snake case btw) and author in all places in a language agnostic way?

from example-mod.

SmushyTaco avatar SmushyTaco commented on September 10, 2024

I guess the easiest solution would be an indirection in the build file which looks for both tags in the .properties and then moves it to a new variable which is used everywhere.

just out of curiosity, java is a camel case language too, isn't it? How do they solve not compromising their build file?

btw on a side note, is there any way to replace all occurrences of mod_id (which is also snake case btw) and author in all places in a language agnostic way?

Well build files by default are actually in Groovy not Java which is a weakly typed interpreted language and they use snake_case there. Kotlin added build file support and I chose to use Kotlin for this mod template because of the IDE support that comes with using a compiled language (like Kotlin) for build files rather than an interpreted language (like Groovy). It just made more sense to me.

from example-mod.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.