LennysLounge / ACC-Race-Control

A live timing app for Assett Corsa Competizione
MIT License
31 stars 5 forks source link

"Could not find method compile() for arguments" trying to compile #9

Closed praboy closed 1 year ago

praboy commented 2 years ago

Hi! I'm adding a feature to the spreadsheet, that writes the speed of cars involved in incidents.

But can't get to compile the project.

PS D:\Download\ACC-Race-Control-master> gradle build

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\Download\ACC-Race-Control-master\Monitor\build.gradle' line: 26

* What went wrong:
A problem occurred evaluating project ':Monitor'.
> Could not find method compile() for arguments [{group=com.fasterxml.jackson.core, name=jackson-core, version=2.12.0}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s

Can you help?

Thank you

praboy commented 2 years ago

Replaced:

dependencies {
    testImplementation     'junit:junit:4.13'

    //compile group: 'org.processing', name: 'core', version: '3.3.6'
    implementation 'org.processing:core:3.3.6'
    compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.0'
    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.0'
    compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.12.0'
    implementation 'com.google.apis:google-api-services-sheets:v4-rev20200707-1.30.10'
    implementation 'com.google.oauth-client:google-oauth-client-jetty:1.30.4'
    implementation 'com.google.api-client:google-api-client:1.30.4'
}

with

dependencies {
    testImplementation     'junit:junit:4.13'

    //compile group: 'org.processing', name: 'core', version: '3.3.6'
    implementation 'org.processing:core:3.3.6'
    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.0'
    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.0'
    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.12.0'
    implementation 'com.google.apis:google-api-services-sheets:v4-rev20200707-1.30.10'
    implementation 'com.google.oauth-client:google-oauth-client-jetty:1.30.4'
    implementation 'com.google.api-client:google-api-client:1.30.4'
}

Now I get:

PS D:\Download\ACC-Race-Control-master> gradle build

> Task :Monitor:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :Monitor:distTar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':Monitor:distTar'.
> Entry ACC Race Control 1.2.2/lib/Monitor.jar is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.1.1/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.
LennysLounge commented 2 years ago

Hi, what version of gradle are you using?

There is a gradle wrapper included that should have the correct version to build the projekt. Try running the build with "graldew build" instead.

Leonard

Am Mi., 11. Aug. 2021 um 20:38 Uhr schrieb praboy @.***

:

Replaced:

dependencies { testImplementation 'junit:junit:4.13'

//compile group: 'org.processing', name: 'core', version: '3.3.6'
implementation 'org.processing:core:3.3.6'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.12.0'
implementation 'com.google.apis:google-api-services-sheets:v4-rev20200707-1.30.10'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.30.4'
implementation 'com.google.api-client:google-api-client:1.30.4'

}

with

dependencies { testImplementation 'junit:junit:4.13'

//compile group: 'org.processing', name: 'core', version: '3.3.6'
implementation 'org.processing:core:3.3.6'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.12.0'
implementation 'com.google.apis:google-api-services-sheets:v4-rev20200707-1.30.10'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.30.4'
implementation 'com.google.api-client:google-api-client:1.30.4'

}

Now it works, but cant figure out next steps. I modified some things, but don't know how to compile and run the program. Never used Gradle before

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LennysLounge/ACC-Race-Control/issues/9#issuecomment-897059715, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCYJDTG2CHQGT3TCJSYKJDT4K7Q5ANCNFSM5B7E3WXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

praboy commented 2 years ago

Thank you, Lenny.

When I use that binary I get:

PS D:\Download\ACC-Race-Control-master> .\gradlew build
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain

It seems gradle-wrapper.jar is missing in ACC-Race-Control/gradle/wrapper/

LennysLounge commented 2 years ago

Jup it was, I just added it to the gitignore so it should be there now.

Pull those changes and try again.