This commit is contained in:
2021-08-31 02:56:58 +03:00
parent c3891a8614
commit 2c6608ae5c
3 changed files with 2 additions and 11 deletions
-10
View File
@@ -1,7 +1,3 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
val vkSecret: String = gradleLocalProperties(rootDir).getProperty("vk.app.secret")
plugins { plugins {
id("com.android.application") id("com.android.application")
id("kotlin-android") id("kotlin-android")
@@ -30,13 +26,7 @@ android {
} }
buildTypes { buildTypes {
getByName("debug") {
buildConfigField("String", "vkSecret", vkSecret)
}
getByName("release") { getByName("release") {
buildConfigField("String", "vkSecret", vkSecret)
isMinifyEnabled = false isMinifyEnabled = false
proguardFiles( proguardFiles(
@@ -35,7 +35,7 @@ object VKAuth {
) = "https://oauth.vk.com/token?grant_type=password&" + ) = "https://oauth.vk.com/token?grant_type=password&" +
"client_id=${VKConstants.VK_APP_ID}&" + "client_id=${VKConstants.VK_APP_ID}&" +
"scope=$settings&" + "scope=$settings&" +
"client_secret=${BuildConfig.vkSecret}&" + "client_secret=${VKConstants.VK_SECRET}&" +
"username=$login&" + "username=$login&" +
"password=$password" + "password=$password" +
(if (captchaSid == null || captchaKey == null) "" else "&captcha_sid=$captchaSid&captcha_key=$captchaKey") + (if (captchaSid == null || captchaKey == null) "" else "&captcha_sid=$captchaSid&captcha_key=$captchaKey") +
@@ -8,4 +8,5 @@ object VKConstants {
"photo_50,photo_100,photo_200,status,screen_name,online,online_mobile,last_seen,verified,sex" "photo_50,photo_100,photo_200,status,screen_name,online,online_mobile,last_seen,verified,sex"
const val VK_APP_ID = "2274003" const val VK_APP_ID = "2274003"
const val VK_SECRET = "hHbZxrka2uZ6jB1inYsH"
} }