tateisu / SubwayTooter

Mastodon client app for Android
Apache License 2.0
237 stars 23 forks source link

Build of nofcm flavor fails #271

Open IzzySoft opened 4 days ago

IzzySoft commented 4 days ago

I've tried to build the nofcm flavor (using ./gradlew assembleNofcmRelease), but the build fails:

> Task :app:compileNofcmReleaseKotlin
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/actmain/ActMainIntent.kt:34:37 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/actmain/ActMainIntent.kt:59:13 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/api/auth/AuthMastodon.kt:11:37 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/api/auth/AuthMastodon.kt:29:33 Const 'val' initializer should be a constant value
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/api/auth/AuthMastodon.kt:29:36 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/api/auth/AuthMisskey10.kt:13:37 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/api/auth/AuthMisskey10.kt:31:41 Const 'val' initializer should be a constant value
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/api/auth/AuthMisskey10.kt:31:44 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/api/auth/AuthMisskey13.kt:13:37 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/api/auth/AuthMisskey13.kt:29:41 Const 'val' initializer should be a constant value
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/api/auth/AuthMisskey13.kt:29:44 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:22:37 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:59:30 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:60:27 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:72:30 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:73:27 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:85:30 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:86:27 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:98:30 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:99:27 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:111:30 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:112:27 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:124:30 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/notification/NotificationChannels.kt:125:27 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/pref/LazyContextHolder.kt:7:37 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/pref/LazyContextHolder.kt:24:37 Const 'val' initializer should be a constant value
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/pref/LazyContextHolder.kt:24:40 Unresolved reference: FcmFlavor
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/push/FcmHandler.kt:16:9 Unresolved reference: FcmTokenLoader

e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/push/FcmHandler.kt:28:13 Unresolved reference: FcmTokenLoader
e: file:///build/repo/app/src/main/java/jp/juggler/subwaytooter/push/FcmHandler.kt:33:13 Unresolved reference: FcmTokenLoader
> Task :app:compileNofcmReleaseKotlin FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileNofcmReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

Any idea what goes wrong there? Thanks in advance for your help!

(for some background: I try to establish Reproducible Builds for your app, see Reproducible Builds, special client support and more at IzzyOnDroid)

tateisu commented 4 days ago

quick fix:

mv app/src/noFcm app/src/nofcm 

I'm windows user and that OS use file names as case-insensitive. maybe fix on repo at next week. (this week I have holiday.)

IzzySoft commented 3 days ago

Ah dang… yes, Windows does not care about case sensitivity but Linux & Co do… Let me try that. And if it works out add a note to the recipe here to remove that line again should the next build fail due to the naming being fixed (though the error "no such file or directory" should be pretty much self-explaining then).

While the build runs now: Are those JAR files in the _Emoji/emojiConverter/src/lib directory needed for building the app – or are those artifacts accidentally checked in and could be removed before starting the build? I could of course "try and find out" – but if they are build again in the process anyway, you might wish to keep them out of the source tree.

Meanwhile, the build is through – not only successful, but also RB, congrats :partying_face: So here comes your welcome toot:

image

Thanks for your help with this! I leave the issue open for your planned fix (and concerning the JARs) – feel free to close then.