diff --git a/README.md b/README.md index 6745d3e..8497b1c 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ After you added the Android project, then you should follow the instructions [Fi You will need a [Mapbox account] in order to get the private and public keys to get it up and running. -Follow the [Mapbox install] guide for further information. I placed both of my keys in the `«USER_HOME»/.gradle/gradle.properties` file. +Follow the [Mapbox install] guide for further information. I placed both of my keys in the `local.properties` file. ### Set up [SonarCloud] properly diff --git a/settings.gradle.kts b/settings.gradle.kts index 5e49689..96e2681 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,23 @@ +/* + * Copyright (c) 2024 Balázs Püspök-Kiss (Illyan) + * + * Jay is a driver behaviour analytics app. + * + * This file is part of Jay. + * + * Jay is free software: you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * Jay is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR + * A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jay. + * If not, see . + */ + +import org.gradle.util.internal.GUtil.loadProperties + /* * Copyright (c) 2022-2023 Balázs Püspök-Kiss (Illyan) * @@ -41,7 +61,8 @@ dependencyResolutionManagement { // This should always be `mapbox` (not your username). username = "mapbox" // Use the secret token you stored in gradle.properties as the password - val mapboxDownloadsToken = settings.extra["MAPBOX_DOWNLOADS_TOKEN"].toString() + val localProperties = loadProperties(File("$rootDir/local.properties")) + val mapboxDownloadsToken = localProperties["MAPBOX_DOWNLOADS_TOKEN"].toString() password = mapboxDownloadsToken } }