Live data from Hacker News

Rawdrawandroid – Build Android apps without any Java, in C and Make

github.com

91–100 of 157 posts

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#91
post #74

Earlier quoted context omitted.

> curl -k " https://dl.google.com/android/repository/commandlinetools-li... " -o commandlinetools-linux.zip unzip somewhere, set path variable > yes | sdkmanager --licenses && sdkmanager "platform-tools" && sdkmanager "ndk-bundle" && sdkmanager "build-tools;33.0.0" "platforms;android-33"

This is better indeed, but from recollection last time I tried this.. I think that still requires a full OpenJDK installation and I believe those `sdkmanager` commands install multiple GB of tools sadly.

Yes to both OpenJDK and large size.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#92
post #5

Earlier quoted context omitted.

I can tolerate Java and Kotlin, but the tooling is just awful *. I've stopped counting how many times I came back to an Android project after only a few months, only to have Android Studio force me to update Gradle and dependencies and whatnot, and break everything. * Of course one could blame me for not learning the ins and outs of the build system!

Eh... "all hail Gradle" :/ Each time I have to touch it, it results in problems... Oh, you updated JDK? Gradle won't work. There is new Gradle? Tough luck it will break your build.. And with Maven it can update and the build keeps working just fine. To that end I mostly ignore prompt "update gradle!" in Android Studio to avoid any issues...

Maven (and pretty much every other build tool with the exception of bazel) is not capable enough for such a complex build as is required for android, though. E.g. maven can often “lose” that something requires a rebuild, and only clean build will produce the correct artifacts. Gradle can always keeps track of tasks correctly.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#93
post #48
post #5

Earlier quoted context omitted.

I can tolerate Java and Kotlin, but the tooling is just awful *. I've stopped counting how many times I came back to an Android project after only a few months, only to have Android Studio force me to update Gradle and dependencies and whatnot, and break everything. * Of course one could blame me for not learning the ins and outs of the build system!

This is why folks should stick with Maven and live a happy, generally drama-free life. As a Gradle veteran, I've written in detail about this previously: https://news.ycombinator.com/item?id=38875936 TL;DR: Gradle is too powerful (which is fun and seems valuable at first!) with too many footguns. Combine this with the mandatory update migrations and you're literally signing up for future pain compared to using a lowe…

With all due respect, that’s a blatant misunderstanding of gradle (though gradle’s documentation not being clear enough, giving to the spread of this misunderstanding is a fair criticism).

Gradle is not too powerful, it builds a build graph based on the .gradle file, and the building itself happens imperatively — but the actual execution is static, based on that fixed build graph. This configuration is cached and subsequent executions will all refer to this static graph to know what requires rebuilding.

This is the minimum required complexity/generality for a build system that is not “hardcoded” for a given task (e.g. to a degree maven, but cargo, go’s build tool etc all can only compile their respective languages on their own. “Plugins” can let them do more, but at that point plugins have to re-develop all the functionality of a build system - caching and parallelization), and as I mentioned there really are only a handful of tools capable of that.

As for valid criticisms of gradle - it’s API historically experiencing constant breakages, used to be dependent on JDK version (and lagged behind for a long time due to Groovy), which is more or less fixed now with toolchains, and the model not being clear enough for people not wanting to dive deep. E.g. I can count on a single hand how many people knows that doFirst/doLast should be used for the actual task itself, anything else will happen at the config build time which is not what you want.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#94

Earlier quoted context omitted.

Same thing with XCode. I'd love a mobile app development pipeline that lets me never use either Android Studio or XCode. Let me drive everything with scripts and/or VSCode extensions.

XCode is awful but JetBrains makes the best IDEs. There are people that dislike all IDEs which I disagree with but understand. VSCode isn't bad but disliking Android Studio just feels like you started with it and didn't want to learn a different tool.

Jetbrains makes great stuff, I only wish their remote development story was better. You basically have to run a full headless instance on the remote and since it's all java it requires way more ram resources than it should.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#95
post #93
post #48

Earlier quoted context omitted.

This is why folks should stick with Maven and live a happy, generally drama-free life. As a Gradle veteran, I've written in detail about this previously: https://news.ycombinator.com/item?id=38875936 TL;DR: Gradle is too powerful (which is fun and seems valuable at first!) with too many footguns. Combine this with the mandatory update migrations and you're literally signing up for future pain compared to using a lowe…

With all due respect, that’s a blatant misunderstanding of gradle (though gradle’s documentation not being clear enough, giving to the spread of this misunderstanding is a fair criticism). Gradle is not too powerful, it builds a build graph based on the .gradle file, and the building itself happens imperatively — but the actual execution is static, based on that fixed build graph. This configuration is cached and sub…

Saying Gradle is the minimum possible for a build tool because it generates a dependency graph is a bit of a stretch. Gradle is essentially a custom groovy/kotlin build script dsl in addition to a dependency manager. I just want the latter; leave the former to existing tools. Maven and plug-ins can do the same without learning a new (and brittle) dsl. Worst case in maven you have to write your own plugin, but then you just use their documented plug-in API (import org.apache.maven.plugin) like any other JVM project.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#96
post #92

Earlier quoted context omitted.

Eh... "all hail Gradle" :/ Each time I have to touch it, it results in problems... Oh, you updated JDK? Gradle won't work. There is new Gradle? Tough luck it will break your build.. And with Maven it can update and the build keeps working just fine. To that end I mostly ignore prompt "update gradle!" in Android Studio to avoid any issues...

Maven (and pretty much every other build tool with the exception of bazel) is not capable enough for such a complex build as is required for android, though. E.g. maven can often “lose” that something requires a rebuild, and only clean build will produce the correct artifacts. Gradle can always keeps track of tasks correctly.

Maven (and pretty much every other build tool with the exception of bazel) is not capable enough for such a complex build as is required for android, though.

Maven is virtually infinite extensibility via plugins. The difference is that gradle is easier to "hack" and put the build logic in your configuration...

> E.g. maven can often “lose” that something requires a rebuild, and only clean build will produce the correct artifacts.

This is not build shortcoming but rather detection what requires rebuild and what not but in the worst case scenario it rebuilds everything…

> Gradle can always keeps track of tasks correctly.

LOL, from my experience that is not true.

Also, if you have multiple projects using different gradle version this results in multiple daemons running in the background. Besides gradle builds as as slow as maven...

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#97

Earlier quoted context omitted.

If targeting Android people should first consider if their app can work as a PWA. Try and do it. if you run into a deal breaking issue with PWA features, then wrap it in a minimalist app shell. Best case: everything works on Android and iOS and it's also a website. Worst case: you will end up doing some platform specific code and dealing with the app stores like you were going to do anyway. Average Case: everything w…

I shipped a PWA in the Play Store. Guess what? It still got delisted because I didn't update to the latest API level or whatever. Unfortunately you can't just ship a PWA with no wrapper. You have to build a special wrapper app that hosts the PWA and you have to use Android Studio and Gradle and all that crap. Updating the wrapper is surely still easier than a whole app, but it's nontrivial and it's frustrating to sti…

> Unfortunately you can't just ship a PWA with no wrapper.

You can… but it won’t be in the Play Store. Disqualifying for many, but not all.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#98
post #80
post #15

Earlier quoted context omitted.

...I of course would rather embed Janet [1], but I realize what is going to have an easier time gaining popularity %) Also, Lua has Löve [2] which could be immediately usable, among other things. [1]: https://janet-lang.org/ [2]: https://www.love2d.org/

thanks for the link to janet! i hadn't heard of it before. a lot of lua energy even if it's a lot bigger

Feel free to ask questions in the Janet Zulip (link at the bottom of the Janet website's front page) if there's anything you need help with!

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#100

There should be a lot more high quality, super lightweight, non bloated apps.

Unfortunately it’s easier to write a useful app (reliable, bug free, with useful features, etc) using more bloated tech. That translates to the cost.

In other words: lightweight, useful, cheap - pick two.

Post reply on HN