Splitting API and implementation without using a subproject for each

In a fairly large project I’m working on the team has the desire to split the public interface of subprojects (the set of interfaces and classes that should be usable by other subprojects) off from the implementation portion that should be considered private. This would be as an alternative to using the Java module system since that proved to be more hassle than it’s worth.

One approach to this is to split each subproject into two subprojects: an api and an impl subproject. The impl subproject has a dependency on the api subproject, consumer subprojects depend on the api subproject as well and one bootstrap subproject depends on the impl subproject to instantiate the implementation parts.

That works, but it’s rather cumbersome since it leads to an explosion of subprojects.
An alternative would be to use multiple source sets and published artifacts to do the same thing. I found an old forum thread describing that approach with a pointer to an example here What's a good pattern for separating API from implementation? - #10 by luke_daley. Unfortunately the link to the sample is dead and I wasn’t able to find a commit in the git repository around the date of that post either. Is that sample still available somewhere? Or is there a simpler solution for the problem I described in the meantime?

Did you interpret the displayed date correctly?
It is not 11th of September, it is September 2011.
This is the commit that added the example: Added sample for separating api and impl in the one java project. · gradle/gradle@146d0c5 · GitHub
But of course this was true 1.0, so quite since things might have changed since then.

And this is the commit where @CedricChampeau removed it: Adjust documentation to remove mention to uploadArchives · gradle/gradle@6a5def6 · GitHub

:man_facepalming: I was looking in 2011, but indeed on the 11th. Thanks!

I realise this is archeological stuff and probably not very relevant anymore. I’m just looking for inspiration on how to achieve the desired split at this point.

I think you already listed the viable options.
JPMS if also the consumer uses it, separate projects, separate source sets.
While separate projects is probably easier to then also publish as separate artifacts and so on, than separate source sets.