-
Notifications
You must be signed in to change notification settings - Fork 39
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
The build fails with an obscure "GradleProperties has not been loaded yet." #270
Comments
What environment are you running this, OS, Java version? Are you trying to build the head or |
Can you post a build scan please? (Run with I tried to run this with the current |
Actually build scan don't even work, I tried earlier, the build fails too early, that's why I added the $ ./gradlew --version
------------------------------------------------------------
Gradle 6.7.1
------------------------------------------------------------
Build time: 2020-11-16 17:09:24 UTC
Revision: 2972ff02f3210d2ceed2f1ea880f026acfbab5c0
Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 11.0.9 (Amazon.com Inc. 11.0.9+11-LTS)
OS: Mac OS X 10.16 x86_64 OSX 10.16 means BigSur 11.1 |
Weird. I just re-ran with Amazon's 11.0.9 JDK on Big Sur, and it works fine. I see no other difference: https://ge.gradle.org/s/m2lw6vyqw7b5i $ ./gradlew --version
------------------------------------------------------------
Gradle 6.7.1
------------------------------------------------------------
Build time: 2020-11-16 17:09:24 UTC
Revision: 2972ff02f3210d2ceed2f1ea880f026acfbab5c0
Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 11.0.9.1 (Amazon.com Inc. 11.0.9.1+12-LTS)
OS: Mac OS X 10.16 x86_64 |
Anything funny in |
I think this error can happen if you have dependencies in an init script. Could you check? |
@lptr I don't think so. bat ~/.gradle/gradle.properties
File: /Users/bric3/.gradle/gradle.properties
1 org.gradle.caching=true
2 #org.gradle.unsafe.watch-fs=true
3 org.gradle.parallel=true
4 org.gradle.warning.mode=all
5
6
7
8 githubCampantyUsername=
9 githubCampanyPassword=
10
11
12 nexusPublicProxyUsername=
13 nexusPublicProxyPassword=
14
15 @melix However might have something, I'm using tasktree in my bat ~/.gradle/init.d/tasktree.gradle
File: /Users/bric3/.gradle/init.d/tasktree.gradle
1 initscript {
2 repositories {
3 maven { url "https://plugins.gradle.org/m2" }
4 }
5 dependencies {
6 classpath "gradle.plugin.com.dorongold.plugins:task-tree:1.5"
7 }
8 }
9 rootProject {
10 apply plugin: com.dorongold.gradle.tasktree.TaskTreePlugin
11 } I also happen to have my own script that used to detect when some of my project had access to internal repositories (via a VPN that wasn't always on). Now we are getting rid of the VPN, hence the commented code bat ~/.gradle/init.d/checknetwork.gradle
File: /Users/bric3/.gradle/init.d/checknetwork.gradle
1 /**
2 * Makes gradle go automatically offline.
3 *
4 * Store in $HOME/.gradle/init.d/checknetwork.gradle
5 */
6
7 apply plugin : CheckNetwork
8
9 class CheckNetwork implements Plugin<Gradle> {
10 void apply(Gradle gradle) {
11 // def hostname = gradle.startParameter.getCurrentDir().toString().contains("some/path") ?
12 // "the.internal.nexus.repo" :
13 // "google.com"
14 // def port = "80"
15 //
16 // Process hasNc = ["sh", "-c", "command -v nc"].execute()
17 // hasNc.waitFor()
18 //
19 // hasNc.getErrorStream().eachLine {println it}
20 //
21 // if(hasNc.exitValue() != 0) {
22 // println "'nc' not available, skipping network check"
23 // return
24 // }
25 //
26 // Process r = ["nc", "-vz", "${hostname}", "${port}"].execute()
27 // r.waitFor()
28 //
29 // boolean goOffline = r.exitValue() != 0
30 // gradle.startParameter.setOffline(goOffline)
31 //
32 // if(goOffline) {
33 // println "Going offline (--offline)"
34 // }
35 }
36 } Could that be the issue ? |
And indeed it is, removing tasktree made the build work. Although it's sad that I'm loosing the feature offered by tasktree. |
Hi,
When I started to play with this project I immediately faced a build error with this message :
GradleProperties has not been loaded yet.
After looking up on the gradle project I found this issue gradle/gradle#13122, but I'm not quite sure why this error happens or how to work around it. Maybe I'm missing something!?
Anyway, following @eskatos recommendation I'm opening an issue there.
Also here's the error with stacktrace.
The text was updated successfully, but these errors were encountered: