Comments (9)
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.
Might have found a solution, going to test it now and if all goes well this issue will be resolved π
from example-mod.
Issue has been resolved! Thanks for bringing this to my attention!
from example-mod.
thanks for putting effort into solving this!
from example-mod.
Upvote issue. Please consider change naming
from example-mod.
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.
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.
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.
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)
- ClassNotFoundException on entrypoint 'main' due to errors HOT 2
- Unresolved Reference error in build.gradle.kts HOT 1
- Is there a guide to modding (like the Fabric Wiki) written in Kotlin, or do we just have to interpret from the Java code? HOT 1
- Impossible to use access widener? HOT 1
- Incorrect license renaming
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from example-mod.