Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Cannot run dotnet cake build.cake successfully #849

Open
Picao84 opened this issue Mar 22, 2024 · 7 comments
Open

Cannot run dotnet cake build.cake successfully #849

Picao84 opened this issue Mar 22, 2024 · 7 comments
Assignees

Comments

@Picao84
Copy link

Picao84 commented Mar 22, 2024

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
Copy link
Member

moljac commented Mar 25, 2024

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.

@moljac moljac self-assigned this Mar 25, 2024
@Picao84
Copy link
Author

Picao84 commented Mar 25, 2024

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
Copy link
Author

Picao84 commented Mar 25, 2024

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

@Picao84
Copy link
Author

Picao84 commented Mar 25, 2024

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
Copy link
Member

moljac commented Mar 25, 2024

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
Copy link
Author

Picao84 commented Mar 28, 2024

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
Copy link
Member

moljac commented Apr 25, 2024

this might give you few hints

novotnyllc/MSBuildSdkExtras#85

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants