Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build #199

Closed
sh7d opened this issue Apr 2, 2024 · 3 comments
Closed

Cannot build #199

sh7d opened this issue Apr 2, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@sh7d
Copy link

sh7d commented Apr 2, 2024

tomek@shadow:~/Syf/paczki/trifa_material-1.0.28$ ./gradlew tun
Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :
e: file:///home/tomek/Syf/paczki/trifa_material-1.0.28/build.gradle.kts:38:61: Unresolved reference: grgit
e: file:///home/tomek/Syf/paczki/trifa_material-1.0.28/build.gradle.kts:44:62: Unresolved reference: grgit
e: file:///home/tomek/Syf/paczki/trifa_material-1.0.28/build.gradle.kts:45:62: Unresolved reference: grgit
e: file:///home/tomek/Syf/paczki/trifa_material-1.0.28/build.gradle.kts:47:61: Unresolved reference: grgit

FAILURE: Build failed with an exception.

* Where:
Build file '/home/tomek/Syf/paczki/trifa_material-1.0.28/build.gradle.kts' line: 38

* What went wrong:
Script compilation errors:

  Line 38:             buildConfigField("String", "GIT_BRANCH", "\"" + grgit.branch.current().fullName + "\"")
                                                                       ^ Unresolved reference: grgit

  Line 44:         buildConfigField("String", "GIT_COMMIT_HASH", "\"" + grgit.head().abbreviatedId + "\"")
                                                                        ^ Unresolved reference: grgit

  Line 45:         buildConfigField("String", "GIT_COMMIT_DATE", "\"" + grgit.head().dateTime.
                                                                        ^ Unresolved reference: grgit

  Line 47:         buildConfigField("String", "GIT_COMMIT_MSG", "\"" + grgit.head().shortMessage.
                                                                       ^ Unresolved reference: grgit

4 errors

* 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.

BUILD FAILED in 9s

Os: Arch Linux
jdk: java-22-openjdk
Release: v1.0.28

@zoff99
Copy link
Contributor

zoff99 commented Apr 3, 2024

./gradlew tun seems to be a typo. can you try with ./gradlew run ?
also do you have git installed?

it only works if you have cloned the repo from git. if you download just the source you may get this error.
will add bug label

@zoff99
Copy link
Contributor

zoff99 commented Apr 3, 2024

@sh7d
you can solve it for now by running:

git init
./gradlew run

@zoff99
Copy link
Contributor

zoff99 commented Apr 4, 2024

ajoberstar/grgit#361

zoff99 added a commit to zoff99/trifa_material that referenced this issue Apr 4, 2024
@zoff99 zoff99 closed this as completed in a3de0b2 Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants