enoosoft / moon_phase

GNU General Public License v3.0
7 stars 7 forks source link

Cannot build android with latest gradle versions #2

Open sigma-libra opened 11 months ago

sigma-libra commented 11 months ago

When building with gradle versions 8 and up, I get the following error:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':moon_phase'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

     If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.
bksubhuti commented 10 months ago

Yes.. I'm here for the same issue.

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':moon_phase' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
bksubhuti commented 10 months ago

oh.. it looks like your complaint is not soooo old.. but it looks like this is not so well supported . What I did was copy the code directly into my project. I made a moon_phase directory and copied all of the the lib files there. It worked fine.

If you want to help.. I'd like to have the moon be a picture of the moon and add black to cover that picture disk.

sigma-libra commented 10 months ago

Yeah, I ended up copying over the files, and that worked fine. For the colors, I will see what I can do.

bksubhuti commented 10 months ago

The centering was off.. I had to do an offset

                child: Transform.translate(
                  offset: Offset(27,
                      27), // adjust the xOffset to reposition the moon to the left

                  child: MoonWidget(
                    size: 100,
                    moonColor: const Color.fromARGB(97, 63, 57, 57),
                    date: selectedDate,
                  ),
                ),

This moon is public domain (as far as I know unless previously copyrighted.. i declare it as cc0) created by dalle3 .. green background to be removed. If you can overlay the painting on this moon.. this would be useful. The green tint on the moon face is a trick of the eyes from the background.

dalleMoon

bksubhuti commented 10 months ago

this is also cc0 if it was not done already (by some other guy i don't know). dalleMoon-2

bksubhuti commented 10 months ago

With some gpt+ stuff. I was able to get the moon to work. The painting is being done on 0,0 coordinates which is why it is not centered.

I have code for this I can do a PR but it seems nobody is responding.

image