processing-android icon indicating copy to clipboard operation
processing-android copied to clipboard

Migrate to maven-publish plugin

Open codeanticode opened this issue 3 years ago • 6 comments

Currently, the maven plugin is used to generate pom files for publication of the core, vr, and ar libraries on JCenter. The maven plugin is deprecated and incompatible with Gradle 7, migration to maven-publishing is recommended:

https://docs.gradle.org/6.7.1/userguide/publishing_maven.html

codeanticode avatar Jan 03 '21 00:01 codeanticode

Working on it...

codeanticode avatar Apr 29 '21 23:04 codeanticode

Hi @codeanticode , I got an idea of eliminating this issue of hosting libraries on maven, JCenter, jfrog, etc (all the free hosting resources available).

We can host our libraries on processing server like - android-sdk : https://processing.org/android/processing-sdk ar-lib : https://processing.org/android/processing-ar vr-lib : https://processing.org/android/processing-vr

and inorder to use this new location from android applications we can update the build files by just including the host server link in them.

Does it sounds reasonable to us ?

If in case Maven stopped hosting all the resource in future then also we need not to worry about that !

Thanks, Rana !

ranaaditya avatar Sep 05 '22 13:09 ranaaditya

I think the main purpose of publishing artifacts on a repository like Maven it being able to include them into Android Studio projects easily. Can that be done if they are self-hosted?

codeanticode avatar Sep 05 '22 14:09 codeanticode

processing4's ant build task uses some jar links self hosted on processing. Last time, When I tried downloading them separately from processing's hosted link. It was taking bit time to download. But the download speed was not that slow. We can consider speed factor here. Thanks

rupeshkumar22 avatar Sep 05 '22 15:09 rupeshkumar22

I think the main purpose of publishing artifacts on a repository like Maven it being able to include them into Android Studio projects easily. Can that be done if they are self-hosted?

Hi @codeanticode , yes self hosted will work exatctly same as that of Maven or JCenter.

In application (using processing-android as external lib) code we would need to just change the dependency downlaoding line in project level gradle build file only, code will look something like:

allprojects {
    repositories {
        maven {
            url "https://processing.org/android/processing-sdk"
        }
    }
}

NOTE: maybe downloading speed will be little lesser than Maven or JCenter as I think they are using distributed storages so they can achieve faster downloading speed.

ranaaditya avatar Sep 05 '22 16:09 ranaaditya

Ok, sounds like it could work out. The url would be https://android.processing.org/...

Let's revisit when we reach this stage.

codeanticode avatar Sep 05 '22 18:09 codeanticode

Hello ! I found this issue and I wanted to work on it. Can you assign me this issue

r1shhh1 avatar Jan 23 '23 17:01 r1shhh1

@r1shhh1 thanks for offering to help! According to what @ranaaditya mentioned a while back, a self-hosted maven repo seems like the best option, is that still your view on this issue?

codeanticode avatar Jan 24 '23 14:01 codeanticode

@r1shhh1 thanks for offering to help! According to what @ranaaditya mentioned a while back, a self-hosted maven repo seems like the best option, is that still your view on this issue?

Hi @codeanticode , yes the permanent solution is shifting to self hosted server.

@rupeshkumar22 are you still working in this issue ? As per last meeting you had researched and debugged few things for this issue.

If @rupeshkumar22 is still not working on this issue then @r1shhh1 can take it and we can discuss it here as well in a meeeting as well !

Thanks, Aditya

ranaaditya avatar Jan 24 '23 15:01 ranaaditya

Looking at #635 sounds like maven publishing is already implemented? haven't tested it, although merged already into main :-)

codeanticode avatar Jan 25 '23 21:01 codeanticode

I would love to see this working! Let me know if I can help somehow.

Maybe using Jitpack is easier than self hosting? It will basically pick this Github repo, build from source and publish each demanded artifact/version. I think it is quite used in the ecosystem.

There are some cases such as F-droid open-source catalogue that needs "trusted" repositories as an acceptance criteria. All the applications are built from source so custom artifact repositories are not allowed. Jitpack would work nicely since it builds the artifacts from source.

I think both solutions are not mutually exclusive, I was just giving an idea in case it might help.

victordiaz avatar Jan 27 '23 00:01 victordiaz

I just tried to trigger a build in Jitpack but it is failing. https://jitpack.io/#processing/processing-android/android-409-android-0217-g208f5e3-1629 https://jitpack.io/com/github/processing/processing-android/android-409-android-0217-g208f5e3-1629/build.log

I'll check a bit more

victordiaz avatar Jan 27 '23 01:01 victordiaz

Learned how to create a maven repo and host it on GitHub (different from GitHub packages, which requires authentication even for importing the dependencies.

4.5.0b5 artifacts are currently available in this new branch:

https://github.com/processing/processing-android/tree/repository

and seems like I can keep adding new versions there.

codeanticode avatar Mar 17 '23 17:03 codeanticode

@codeanticode Finally something has been done on this, I'm happy that it worked. Thanks for doing something about it Andres.

rupeshkumar22 avatar Mar 17 '23 20:03 rupeshkumar22

@victordiaz let me know if you can use the new self-hosted repo:

https://github.com/processing/processing-android/tree/repository

I have tested with a library project and looks good.

codeanticode avatar Mar 23 '23 12:03 codeanticode