JetBrains / kotlinconf-app

KotlinConf Schedule Application
Apache License 2.0
2.93k stars 303 forks source link

Build error: Could not get unknown property 'MAPBOX_ACCESS_TOKEN' #64

Open PraveenTalari opened 5 years ago

PraveenTalari commented 5 years ago

Added local.properties and ran ./gradlew build I have the following error

Kotlin Multiplatform Projects are an experimental feature. Target 'ios' for platform ios_x64 is ignored during build on this mingw_x64 machine. You can build it with a mac

FAILURE: Build failed with an exception.

queiroz commented 5 years ago

check this pull request :)

atomgomba commented 5 years ago

put this in your top-level build.gradle:

ext {
    MAPBOX_ACCESS_TOKEN='"YOUR PUBLIC TOKEN"'
}
opengamer29 commented 5 years ago

Information about MAPBOX_ACCESS_TOKEN from this PR should be added to README

burkhardm commented 4 years ago

put this in your top-level build.gradle:

ext {

This did not work for me using the latest changes.

I found that there are build config fields in place in the file android\app\build.gradle, that have been commented out by commit b83d00ee

Uncomment the buildConfigFields and insert your MAPBOX_ACCESS_TOKEN. Just make sure that you insert both \". Otherwise, the code generator will produce invalid results.

productFlavors {
        local {
            buildConfigField("String", "API_URL", "\"https://api.kotlinconf.com\"")
            buildConfigField("String", "MAPBOX_ACCESS_TOKEN", "\"<insert-your-token>\"")
            dimension "server"
        }
        prod {
            buildConfigField("String", "API_URL", "\"https://api.kotlinconf.com\"")
            buildConfigField("String", "MAPBOX_ACCESS_TOKEN", "\"<insert-your-token>\"")
            dimension "server"
        }
    }