xamarin / GooglePlayServicesComponents

Other
313 stars 145 forks source link

Cannot run dotnet cake build.cake successfully #849

Open Picao84 opened 3 months ago

Picao84 commented 3 months ago

Hello,

I've been trying to build this project locally but running dotnet cake build.cake always ends up in failure as it cannot download any of the jar sources! Any idea what might be wrong?

Thanks, Tiago

moljac commented 3 months ago

Hello,

I've been trying to build this project locally but running dotnet cake build.cake always ends up in failure as it cannot download any of the jar sources! Any idea what might be wrong?

Nothing. Does it stop? Basically detecting whether maven artifact exist is 200 vs 404 probing.

dotnet cake calls dotnet cake -t=ci and you should find nugets in ./output/ folder. Do not interrupt it until it finishes.

Did you add new artifacts? if yes those might cause errors and exits/stops later.

Picao84 commented 3 months ago

I did not add new artifacts. I managed to get further now and I get an error from Gradle.

Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 [in thread "Daemon worker"]

I guess there might be issues with JAVA and Gradle versions? Which do you recommend? Thanks!

Picao84 commented 3 months ago

I managed to solve it by specifying JAVA version 11 location on Gradle.Settings file!

Picao84 commented 3 months ago

Oh, oh.. now on the libs task I get: "error MSB4057: The target "_GetRestoreSettingsPerFramework" does not e xist in the project. [TargetFramework=MonoAndroid12.0]" on every project...

moljac commented 3 months ago

I did not add new artifacts. I managed to get further now and I get an error from Gradle.

OK. I asked/stated because I thought you might want to bind something new.

Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 [in thread "Daemon worker"]

I guess there might be issues with JAVA and Gradle versions? Which do you recommend? Thanks!

Most likely. Which java do you have installed?

 gradle --version
------------------------------------------------------------
Gradle 8.6
------------------------------------------------------------

Build time:   2024-02-02 16:47:16 UTC
Revision:     d55c486870a0dc6f6278f53d21381396d0741c6e

Kotlin:       1.9.20
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          11.0.16.1 (Microsoft 11.0.16.1+1-LTS)
OS:           Mac OS X 14.4 aarch64

I see AX is using 6.3 and GPS-FB-MLKit repo (this one) uses 6.1.1.

Picao84 commented 3 months ago

So I was able to run all tasks now until libs fails with "The target _GetRestoreSettingsPerFramework does not exist in the project" on every single project. Any idea why? Thanks in advance!

moljac commented 2 months ago

this might give you few hints

https://github.com/novotnyllc/MSBuildSdkExtras/issues/85