Kaj Koivunen
01/12/2023, 2:27 PMbuildConfigField("String", "API_KEY", API_KEY)
and under where should it be placed in the default build script intellij IDEA gives you for a jvm console project? I tried just about anything and it just seems buildConfigField is not recognized on kotlin side of thingsSam
01/12/2023, 2:28 PMbuildConfigField
is part of Android, it won’t exist in a basic JVM console appVampire
01/12/2023, 2:28 PMbuildConfigField
afair is something specific to Android projects, added by the Android Gradle Plugin.Vampire
01/12/2023, 2:29 PMKaj Koivunen
01/12/2023, 2:29 PMmbonnin
01/12/2023, 2:30 PMKaj Koivunen
01/12/2023, 2:30 PMmbonnin
01/12/2023, 2:31 PMmbonnin
01/12/2023, 2:31 PMmbonnin
01/12/2023, 2:32 PMVampire
01/12/2023, 2:32 PMmbonnin
01/12/2023, 2:32 PMmbonnin
01/12/2023, 2:32 PMVampire
01/12/2023, 2:33 PMexpand
in processResources
task configuration to fill the placeholder with the actual value. The code can then read it from that properties file.Kaj Koivunen
01/12/2023, 2:34 PMKaj Koivunen
01/12/2023, 2:35 PMVampire
01/12/2023, 2:36 PMrun
task and then use the run
task to test your app and read it from where you configured itVampire
01/12/2023, 2:36 PMif there's no easy way to just have a build variableThe way I described is pretty easy
Adam S
01/12/2023, 2:37 PM./src/main/resources/local.properties
, and then adding the file to .gitignore
? In code you can try and load the file, and if it’s not present, then prompt the user for input?Vampire
01/12/2023, 2:38 PMVampire
01/12/2023, 2:38 PMAdam S
01/12/2023, 2:40 PMkevin.cianfarini
01/12/2023, 9:17 PMgildor
01/13/2023, 2:41 PM