Hello. I just started working on this issue: <htt...
# atrium
a
Hello. I just started working on this issue: https://github.com/robstoll/atrium/issues/1456 The build keeps failing. I am on windows, using intellij community edition 2022.3.3. I will post the error message soon. Not sure what is failing and why. Thread in Slack Conversation
r
sounds like your user does not have permissions to create symlinks
a quick workaround which might work is to start intellij with admin rights
otherwise check if your user has the right: https://portal.perforce.com/s/article/3472
how is your dev setup? are you using WSL? You are not the first one encountering this problem: https://github.com/robstoll/atrium/issues/1286#issuecomment-1539190170 If there are more, then we might want to disable this test in case someone has not the required privileges
a
Hello. Thanks @robstoll. I tried adding my own account to create symbolic links and even ran idea on administrator but it is still failing with the same errors.
image.png
r
basically all tests which create symbolic links fail
a
Yeah
r
are you using WSL?
(Windows Subsystem for Linux)
we never ran into this problem in CI, so I try to find out why it doesn't work for you
a
I am just using windows. Should I switch to wsl?
r
don't know as I am not using Windows at all, just figured maybe that could be a reason
can you check what permissions you have on
C:\Users\anmol\AppData\Local\Temp
in any case, those tests are not relevant for your change. So it's also fine if you ignore them
a
So, I just have to create a check-dexer.kts file in the root and have the gradle code converted in kotlin, right?
r
well not in the root, place it in the same place it already is, so in gradle/scripts and yes, rename the file to check-dexer.kts (rename also the reference in build.gradle.kts in the root) and convert it accoringly
download android-25.jar and then run
CI=true ATRIUM_ANDROID_JAR=C:\path\to\android-25.jar ./gradlew checkDexer
it should fail with android-25 and succeed with android-26
checkout .github/workflows/build-ubuntu.yml there you see how we download the android.jar
a
Thanks a lot Robert.
I could not make things work with powershell, so I switched to WSL
Now everything is building correctly.
I did run into an issue though
When I run checkDexer, I receive an error: https://katb.in/kayiyewadop The function is supposed to just get string but is somehow getting other values too. I don't know from where. The error persists even when I remove the function call from check-dexer.kts
Can you please help me with that?
r
taking a look
rename check-dexer.kts to check-dexer.gradle.kts (sorry did not realise that you missed out gradle further above)
In my case intellij has unfortunately problems with syntax highlighting. I suggest you move the file into /gradle/build-logic/root-build/src/main/kotlin and name it build-logic.check-dexer.gradle.kts apply it then via
Copy code
if (java.lang.Boolean.parseBoolean(System.getenv("CI"))) {
    apply(plugin = "build-logic.check-dexer")
}
Syntax highlight works then and reveals that you need to change a few more things
(you can remove fun prefixedProject now as it already exists)
a
Thank you. Renaming it worked. Now I have a lot of errors to solve.
Hello Robert. Sorry again. I tried finding an alternative to the configure function in kotlin but there exists none. How do you propose I apply those configurations?
r
not sure what you mean. Can you push a PR, makes it easier to talk about
if you mean applying the check-dexer :
Copy code
if (java.lang.Boolean.parseBoolean(System.getenv("CI"))) {
    apply(plugin = "build-logic.check-dexer")
}
instead of
apply(from= ...)
a
I am sorry for taking so much time on this issue. Working on windows is not going the way I want it to. Even with WSL. I will just switch to linux or mac.
r
no stress, feel free to paste again the error message, I'll try to help.
a
Thank you