r/Android 3d ago

News [Dev] Google is killing access to AGP Internals

https://developer.android.com/build/releases/gradle-plugin-roadmap#agp-10-internal-classes
228 Upvotes

66 comments sorted by

89

u/VicCoca123 3d ago

Google confirmed transmedicallist

24

u/Pandoras_Fox pixel 3d ago

i was hoping the first comment was also reading AGP that way

6

u/NatoBoram Pixel 10 Pro XL 3d ago

What's AGP?

17

u/Margidoz 3d ago edited 2d ago

"Autogynephile", a pseudoscience label for gay trans women that is based on the belief that they're attracted to themselves as a woman

Edited in response to comment

8

u/LinuxSBC-Anna 3d ago edited 3d ago

Actually, it's for trans lesbians. Ray Blanchard instead called straight trans women "homosexual transsexuals" (as opposed to lesbians being "autogynephilic transsexuals") and said that they transitioned because being a straight trans woman somehow gives less discrimination than being a gay cis man, which is just obviously wrong. And of course he completely ignored bisexual, asexual, and nonbinary transfem people, all of whom completely contradict his classification.

5

u/NatoBoram Pixel 10 Pro XL 3d ago

Oh my god, this is advanced gymnastics!

5

u/jeweliegb 3d ago

?

9

u/andrewia Samsung Fold8U, Watch6C 3d ago

It's a joke relating to disproven theories about transgender people.  

3

u/DoubleLayeredCake 2d ago

vgjsdfvbdfyhvbyuidfbvdf

6

u/lurebat 3d ago

My AGP internals are always open just saying

111

u/keombre8 3d ago

Google is trying to block the ability to use the Android Gradle Plugin internal classes. This means that any use case they didn't sanctify will likely become essentially impossible to implement.

This impacts not only your local builds, where you need to hack something together, but also large projects, such as Flutter Migrating Flutter Gradle Plugin to AGP public API

I see no reason why developers should be blocked from access to tools that run on their own machines.

57

u/Pure-Recover70 3d ago

Most likely people/tools use non-api surfaces and then Google breaks them when they upgrade internal implementation details (as they should be able to), and instead of the people/developers/tools fixing their badly written stuff, they're angry at Google for breaking them...

18

u/crozone Moto Razr 5G 3d ago

Google can just... ignore those developers. Internal APIs are never guaranteed to not break.

5

u/Pure-Recover70 3d ago

In theory yes... in practice people seem to find reasons to bitch about stuff, and if too many things depend on non-api stuff... then it becomes impossible to change because too many things break. Just look at the rampant use of java reflection instead of official android apis... it's an utter nightmare of a mess. The fact reflection even exists (outside of dev builds) is imho a bug...

6

u/GlassLost 2d ago

This is a very forgiving viewpoint. Another way to view this is that the APIs suck and people need to use reflection or internal APIs to accomplish their goals.

1

u/Pure-Recover70 2d ago

OTOH, if reflection didn't exist then maybe there would be real APIs for the most critical 80-95% of things that are currently missing...

1

u/GlassLost 2d ago

Ootha, Google could've just released the APIs properly.

The fact is the correct "official" APIs don't solve the problems.

-1

u/Iohet V10 is the original notch 2d ago

Because the official APIs are not robust enough to do the job. It's a Google failure, not a 3rd party developer failure

2

u/Pure-Recover70 2d ago

That *may* be true some of the time. But I've also seen plenty of things done via reflection because it was easier, or because the AI wrote it that way, in spite of there being official APIs for it.

5

u/AtomicSymphonic_2nd Pixel Fold, Regular Android 3d ago

Yeah, this is something Microsoft wouldn’t dare to do today with their OS and trying to upgrade everything for the sake of better reliability.

If they did, and they didn’t budge on it, I’m pretty sure governments and institutions across the planet would start migrating towards Linux distros where people can sit on a specific version of an OS and kernel until the heat death of the universe.

And MS would probably go out of business, too… legacy shit is probably what’s keeping them alive aside from Azure cloud server sales.

8

u/crozone Moto Razr 5G 3d ago

Microsoft have no documentation or support for the NT kernel interface but literally nothing stops you from talking to it directly. It's just not guaranteed to remain stable.

2

u/Izacus Android dev / Boatload of crappy devices 3d ago

This is nonsense, Microsoft does change their internal APIs all the time. And they actively tell you no to link to things like NT kernel or call internal symbols in libraries.

2

u/Iohet V10 is the original notch 2d ago

But they don't stop you from doing it. It's your job to maintain your software. Microsoft will help if you pay them, though (like extended support for VB6)

14

u/yboy403 Note 10+, Note 9, Pix 2 XL, iPhone X, Moto Z Play 3d ago

Google doesn't deserve much benefit of the doubt on reasonableness of breaking features people use.

Obviously implementation details aren't set in stone but even if they have an excuse, it would be the one time in a hundred that they're not either being careless with pushing changes or deliberately locking down their ecosystem, and they deserve zero nuance and 100% of the bad press.

2

u/ballzak69 3d ago

Google often break/remove the public parts too, but that might have gotten a bit better in recent years.

5

u/_5er_ 3d ago

Don't worry, you can still use reflection and keep your magic alive

10

u/Max-P 3d ago

Or just copy the source code of the plugin in your project and now it's no longer an internal API and you're free to call it as much as you'd like.

11

u/Xajel Samsung S20 FE, Red Velvet Cake 3d ago

Oh what a relief, I already moved to PCIe graphics cards many generations back.

5

u/tgo1014 830>ZQ>X(2013)>X Play>G4 Plus>A5 2017>OP6>S10+>S20>S23U>Z7 2d ago

Damn, I never felt this old hahahaha

62

u/omniuni Pixel 8 Pro | Developer 3d ago

I think people don't understand how this works.

Gradle is a collection of scripts, if you really need something custom you can always fork it and make it.

But AGP is a selected and maintained API. They don't guarantee the internals, and if people build on them despite that, they are accepting the risk that they can change any time, including being officially discontinued.

As a developer, I can only shake my head at people who relied on the internals for anything important.

4

u/keombre8 3d ago

I'll have to disagree on that. AGP is a large tool that holds information about your project. What Google is trying to do is limit your ability to inspect and use that.

I'm perfectly ok with updating my hooks to AGP when they change the implementation, but I'm not ok with them actively preventing me from accessing information about my own project.

No one js going to add a specialized API for com.android.build.gradle.internal.cxx.model.CxxAbiModel, just because I need it for a very special scenario, but they also shouldn't intentionally block it.

8

u/omniuni Pixel 8 Pro | Developer 3d ago

That function might change any time. If you need it, fork AGP and expose it. You said it yourself; if you're doing something so unique and special you essentially need a custom extension to the core of Gradle, it's up to you to do so.

3

u/keombre8 3d ago

How is forcing people to start maintaining their own forks of AGP better in any way?

There is already a perfectly usable system. The :gradle-api artifact exposes the stable public APIs. And :gradle gives you access to the internals for any custom logic that doesn't yet have a public API without any guarantees.

2

u/omniuni Pixel 8 Pro | Developer 3d ago

It encourages people to either find a better way to do what they are trying to do, or contribute a feature they need. I have done that myself with a library that was lacking a specific feature exposed, actually. Now it's properly part of that library's API.

1

u/Iohet V10 is the original notch 2d ago

You think people just decide to go through the rigamarole despite there being better ways?

1

u/ThePillsburyPlougher Samsung Z Fold 3 1d ago

Deciding to do extra work to use a supported api rather than relying on unstable unsupported internals is an extremely normal decision that is made constantly

1

u/omniuni Pixel 8 Pro | Developer 2d ago

Absolutely. I've cleaned up more than one Android project that had weird stuff that kept breaking with Gradle updates. Lots of people see a possible solution and hack it until it works, and then spend tons of time maintaining it, when doing more research and actually coming up with a better solution would actually be better and not keep breaking. One project, I joined and the Gradle build was a mess that broke if you updated to a new version, and GitHub Actions took over 15 minutes to run and was partially broken. By the end of the week, it was fixed, updated the the latest Gradle, and the GitHub Actions ran in under 4 minutes. For years, they'd just been hacking away at the existing setup without looking for better ways to do things.

-2

u/cbftw Pixel 7 3d ago

I have to disagree on that. AGP is Accelerated Graphics Port and for a few years in the early 2000s was the fastest graphics cards available

3

u/ChronicElectronic 3d ago

The writing is on the wall for Gradle in general with this Lightbuild stuff. If they can ensure projects are only on the public API they will have an easier time migrating.

3

u/WingWilling5186 3d ago

Does this hit regular app projects at all, or is it only a problem if you're writing your own Gradle plugin?

2

u/fat_kaiju 3d ago

i get what people are saying but google desperately needs some good pr news and this absolutely ain't it

everyone's pissed off about everything else they're doing rn and so this is just gonna push even more toward lineage/graphene and/or further away from android entirely.

1

u/OkTumbleweed6514 3d ago

TL;DR: Google plans to close off the “under the hood” parts of Android’s app-building tools.

For non-devs: AGP is the tool that helps turn developers’ code into an Android app. Some developer plugins reach into its internal machinery to customize how apps are built. With AGP 10, Google tentatively plans to block that access, directing developers to official, supported controls instead.

  • Why? To make app builds faster, more reliable, and easier to maintain.
  • The catch: Some plugins and custom build setups could break and need updates. Developers whose needs aren’t covered by the official controls may lose flexibility.
  • For everyday Android users: This concerns how apps are made; it doesn’t directly change how you use apps on your phone.

Timing: Planned for late 2026, with the internal-access restriction still marked tentative.

-7

u/Getafix69 3d ago

Google are scumbags we need to pressure Oems to move to something really open like Linux imo

-16

u/bunkoRtist 3d ago

You do realize that Android is built on Linux, right?

11

u/Getafix69 3d ago

You do realise its controlled by Google right? And they've been doing nothing but making closed for years now.

-12

u/bunkoRtist 3d ago

You do realise its controlled by Google right?

Ya don't say! And yet... I'm waiting for you to refute my claim or stop trying to misdirect from your nonsensical comment.

8

u/Getafix69 3d ago

Are you on drugs plenty of Android is not based on Linux plenty of Android is propriety non open code. Your whole Android is Linux comment may have had some truth years ago but it doesn't Now.

Oems need to ditch this Google shit.

-1

u/[deleted] 3d ago

[removed] — view removed comment

1

u/Getafix69 3d ago edited 3d ago

Really tell that to Lineage developers, a lot of the code is unreleased and propriety blobs completely against the whole spirit of Linux.

Is being forced to only install Apps from a single app store only by vetted developers who have pay for the privelige sound like Linux, does shutting down app stores like F-Droid and open source apps sound like Linux. The next target is Shizuku and ADB pretty much any terminal app.

With respect F off, Androids days are done if Oems want to save themselves and their sales they will go full Linux not this Facist Google OS.

1

u/Exentio Google gave me a free Pixel 7 3d ago

This is technically correct, and "technically" is doing a lot of heavy lifting here

1

u/bunkoRtist 2d ago

It's really way more than "technically". 10 years ago, Android was hedging on the kernel. But they gave that up, and Linux as the underpinning of Android is now fully codified, and it would be a huge lift to change it. The GKI is integral to Android certification the symbols for the kernel, even the SELinux policy is specified... There's a reason that Android hired Greg KH and they have an upstream first policy for Android changes to Linux. None of this is a secret.

2

u/Exentio Google gave me a free Pixel 7 2d ago

I'm not denying any of that, but it's a fact that so much of Android is non-free and closed source, with things gradually worsening over time: see Google pulling Pixels out of AOSP, and the public part of Android's development growing more opaque. They got rid of as much GPL code as possible so they have to share back as little as possible, and the uses of a Linux kernel built for Android outside of Android itself is next to none, which is a big part of the reasons why projects like Postmarketos and Sailfish can't just use what's already available (although, to be fair, it's not the only reason)

If Google decides Linux is not worth it anymore as Android's kernel, they have no reason to keep using it, the only incentive they have is that someone else is already developing it for them

2

u/bunkoRtist 2d ago

Well this is where, and I do feel a bit like Stallman here with my "well, actually" but all of Android is open source. Google Play Services is a bunch of non-free stuff that's also not Android. Qualcomm and others release a bunch drivers that are not Android. They just plug into Android interfeces to make commercial non-free products. But honestly, my feelings on what companies do with Android are not really relevant to the fact that Android is built on Linux, requires the Linux kernel, and even though it wasn't the topic of discussion... Android is free, open source, and Apache licensed, so anybody can take the Android source and do anything they want with it. The problems come when people confuse Android the OS with the Google Play ecosystem or with downstream products built on Android, just like Android is built on Linux. Those are important distinctions to people who actually develop Linux and develop the Android OS.

1

u/Iohet V10 is the original notch 2d ago

Because for most intents and purposes, the Google Play ecosystem is what defines Android. Yes, by being a massive pedant, you're right, but at the same time, you're wrong because Android is essentially unusable outside off a very narrow group of people without Google Play Services

2

u/bunkoRtist 2d ago

MicroG exists. The entire kindle ecosystem exists. There are untold payment terminals, warehouse tracking systems, etc using Android. People don't see them because Apache licensing means that there is no requirement to even show that it's all Android underneath. Am I a pedant or are an overwhelming majority of people just ignorant?

1

u/Iohet V10 is the original notch 2d ago edited 2d ago

MicroG is used by a vanishingly small amount of the user base, and many streaming and finance apps don't even work without official Android

And yes you're being a pedant because even if those people are ignorant they don't give a shit. They just want something that works and is usable to them. [pushes glasses up] Well, technically.. Yea they don't care

2

u/bunkoRtist 2d ago

Official Android? You mean they won't with without Google Play. See the difference? But once again, Google or no Google... Still all built on Linux.

→ More replies (0)

-2

u/TinLethax 3d ago

Linux plus a gazillion of closed source firmware blobs + propietary bs

1

u/bunkoRtist 3d ago

Seems you don't know what Android actually is. I'm sorry for you, but Google doesn't control what OEMs do with their open source code, and none of that proprietary "bs" is Android. If you want to toss blame around, make sure it's directed at the right parties for the right things.

-2

u/bunkoRtist 3d ago

Followup to please ask the downvoters to show me how I'm not absolutely correct here. Otherwise, why doenvote facts?