Live data from Hacker News

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

github.com

131–140 of 157 posts

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

#131

Given that it's a thin wrapper around GL and friends, could one have an alternate implementation of these calls and do most of the dev work natively on the desktop? And not muck around with devices or emulators except for some final / edge case testing? I just remember working with Libgdx back in the days. A game framework made for Android. It however was cleverly designed in that you could just run it on desktop by…

Present tense, LibGDX is still around, even though it isn't Unity or Godot like cool.

https://libgdx.com/

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

#132
post #130
post #128

Earlier quoted context omitted.

Android team marketing. Almost no other build tool has had so many conference talks regarding performance issues, and dealing with its gotchas as Gradle.

I am primarily a backend developer, so nope. Also, give me any build tool that would be similarly capable. I only know of Bazel.

Maven is more as capable for anyone that doesn't suffer from XML allergy, and doesn't require a background daemon to actually make it run at reasonable speed.

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

#133
post #132
post #130

Earlier quoted context omitted.

I am primarily a backend developer, so nope. Also, give me any build tool that would be similarly capable. I only know of Bazel.

Maven is more as capable for anyone that doesn't suffer from XML allergy, and doesn't require a background daemon to actually make it run at reasonable speed.

Correctness is the number 1 priority, and maven is simply not always doing what it should, unless you do a clean build.

I am absolutely not bothered by XML and alia (btw, there are maven frontends in json/yaml, etc for those who are), and throwing out valid criticism over some straw man is not really productive.

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

#134

Earlier quoted context omitted.

Isn't flutter (especially including the flutter rust bridge), achieving that? You do need Android Studio and XCode installed on your machine but you don't have to interact with them directly.

As someone interested in flutter, when do you have to use XCode and Android Studio?

I develop an app with flutter on Mac OS. I open xcode when creating a new project to setup signing. I never installed Android studio since I use an Android device for testing and just use the command line tools and SDK (setting this up without android studio was a bit of pain and probably not worth it but still it proves that it's possible).

All development work takes place in VS code, including the incredibly incredibly convenient and performant hot code reload, as well as the final step of "flutter build ios"/"flutter build aab"

It is an experience with very few pain points* and I find it to be very enjoyable.

*except for the random Cocoa Pods error every few months which can be solved by random helpless googling and then deleting the podfile.lock

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

#135
post #121

Earlier quoted context omitted.

> Losing the only task of a build tool, caching and parallelization. You are aware that Maven does offer paralle build, right? > I guess maven just doesn’t have an accurate build graph? You guess wrong? then >> LOL, from my experience that is not true > In what way is it not true? Consistency of gradle build. You yourself stated just a paragraph above that sometimes you have to run "clean" xD > Also, gradle is demons…

> Consistency of gradle build. You yourself stated just a paragraph above that sometimes you have to run "clean" xD That was in reference to maven.. Also, feel free to show me any benchmark showing maven being as fast as gradle. https://gradle.org/gradle-vs-maven-performance/

> Also, feel free to show me any benchmark showing maven being as fast as gradle. https://gradle.org/gradle-vs-maven-performance/

I tried and * commons took more than 2,5 minutes to build (they show 70s?) * tried their tests (medium project, https://github.com/gradle/performance-comparisons/tree/maste...) and maven compiled it in 4s and usual "clean install" took 14s but they don't enable paralel test run); then I tried running "gradle build" and... got an error:

``` FAILURE: Build failed with an exception.

* Where: Build file '/Users/wojtek/dev/tmps/performance-comparisons/single-medium-project/build.gradle' line: 16

* What went wrong: A problem occurred evaluating root project 'single-medium-project'. > Could not find method compile() for arguments [commons-lang:commons-lang:2.5] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. ```

It's so nice that even gradle team themselves can keep up with their crap xD but of course it's probably due to convoluted setup... again - with maven you just clone and build and be done with it, with gradle you have to "stand on your head" to figure how to make any progress... I updated the build.gradle (according to https://docs.gradle.org/current/userguide/declaring_dependen...) and `gradle build` finished in 19s...

So your beloved gradle is 25% slower and can't even be compatible with itself...

I took a look at "large-multimodule" to have something more challenging but: they setup each project individually and for some convoluted reason configure maven compiler with `1.5` (and JDK21 complains) and same goes for gradle modules with broken `dependencies`. I adjusted it but then it turned out that the sources can't even compile (due to wrong arguments in tests) ffs...

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

#136
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!

Gradle/Studio rot is so bad . If you continuously keep up to date it's not so bad, but you're absolutely fucked if you want to open a project from a year ago. Unfortunately this doesn't actually protect you from that since you still have to deal with that for both the actual "make an APK" step as well as the Java bindings for critical features.

I don't remember the details, but I was struck by the huge size of Gradle. Isn't it just a build tool? Why does it need so many updates?

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

#137
post #131

Given that it's a thin wrapper around GL and friends, could one have an alternate implementation of these calls and do most of the dev work natively on the desktop? And not muck around with devices or emulators except for some final / edge case testing? I just remember working with Libgdx back in the days. A game framework made for Android. It however was cleverly designed in that you could just run it on desktop by…

Present tense, LibGDX is still around, even though it isn't Unity or Godot like cool. https://libgdx.com/

Yeah, sorry, the past tense was supposed to be my usage of it, which was around 2012-2015. I was quite active, maintaining lots of the documentation, writing guides on how to do stuff. Specifically how to get it running with IntelliJ, as android sdk at the time was eclipse integrated.

Also made a simple project on github to show how to do a "loading screen", aka not just freeze while it loads but have a progress bar and interactivity. Somehow it still gets random stars a decade later.

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

#138
post #71

to be clear, this is only really useful for applications that present their ui through opengl and do not interact with the rest of the android system very much. the ndk is meant for writing little bits of c to speed things up in a classic java android application. this is a pretty cool hack that allows for opengl apps to be written in straight c that run full screen and have limited access to things like keyboards, a…

> this is a pretty cool hack that allows for opengl apps to be written in straight c that run full screen and have limited access to things like keyboards, adc inputs or usb. It's not even a hack. Android NDK added that way back in like gingerbread, it's just a NativeActivity. https://developer.android.com/ndk/samples/sample_na This is just a small framework on top of that. It's not doing anything "new"

it is, however, cross platform for a handful of embedded targets of which android is one of.

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

#139
post #97

Earlier quoted context omitted.

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.

this is what I do. are you really any more discoverable there?

I don't think so.

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

#140

May be someone with deep pockets like Elon must get Linux to work on mobile. I know there's efforts going on but seems slow progress. That will break the back of the duopoly and also make things like this so much easier.

(I assume by "Linux" you mean a distribution like Arch/Debian/Fedora/Ubuntu/… since, as the sibling says, Android also runs Linux.) > That will break the back of the duopoly and also make things like this so much easier. …and so much less secure by giving every application access to everything in my home dir. No, thank you.

Restricting app filesystem access is easily doable with Flatpak, Firejail, systemd-run, etc. Hardware support and UX are much bigger problems.
Post reply on HN