diff --git a/README.md b/README.md index 2c5a621017..7be47dbb6f 100644 --- a/README.md +++ b/README.md @@ -62,14 +62,14 @@ The available library modules are listed below. * `android-sdk-core`: Core functionality (required). * `android-sdk-api` : Api generated models and methods. -* `androidsdk`: deprecated copy version of the android-sdk-core(will be removed in future releases). -* `androidsdkapi` : deprecated copy version of the android-sdk-api(will be removed in future releases). +* `androidsdk`: deprecated copy version of the android-sdk-core(will be removed in future releases since 01.09.2021). +* `androidsdkapi` : deprecated copy version of the android-sdk-api(will be removed in future releases since 01.09.2021). For example, your `app/build.gradle` script will contains such dependencies: ``` dependencies { - implementation 'com.vk:android-sdk-core:3.0.0 - implementation 'com.vk:android-sdk-api:3.0.0 // generated models and api methods + implementation 'com.vk:android-sdk-core:3.x.x + implementation 'com.vk:android-sdk-api:3.x.x // generated models and api methods } ``` diff --git a/dependencies.gradle b/dependencies.gradle index eac1e39e8d..bb36b32f21 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -23,8 +23,8 @@ SOFTWARE. */ ext.sdkVersions = [ - code : '23', - name : '3.0.0', + code : '24', + name : '3.1.0', minSdk : 21, targetSdk : 29, diff --git a/publish.gradle b/publish.gradle index 6e6e8bfabd..8adf1efe2a 100644 --- a/publish.gradle +++ b/publish.gradle @@ -38,6 +38,11 @@ def getArtifactId() { return envArtifactId != null ? envArtifactId : sdkPublish.POM_ARTIFACT_ID } +def getArtifactDescription() { + def envArtifactId = System.getenv('POM_ARTIFACT_DESCRIPTION') + return envArtifactId != null ? envArtifactId : sdkPublish.POM_ARTIFACT_DESCRIPTION +} + if (System.getenv('SDK_UPDATE') == "1") { apply plugin: 'com.jfrog.bintray' apply plugin: 'maven-publish' @@ -62,7 +67,7 @@ if (System.getenv('SDK_UPDATE') == "1") { pom.project { packaging 'aar' name sdkPublish.POM_NAME - description sdkPublish.POM_DESCRIPTION + description getArtifactDescription() url sdkPublish.POM_URL scm { diff --git a/samples/app/notTranslatedStrings/values/strings.xml b/samples/app/notTranslatedStrings/values/strings.xml deleted file mode 100644 index ea100eaef3..0000000000 --- a/samples/app/notTranslatedStrings/values/strings.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/samples/app/sdk/src/.gitignore b/samples/app/sdk/src/.gitignore deleted file mode 100644 index 796b96d1c4..0000000000 --- a/samples/app/sdk/src/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/samples/app/sdk/src/build.gradle b/samples/app/sdk/src/build.gradle deleted file mode 100644 index 390c26b8bb..0000000000 --- a/samples/app/sdk/src/build.gradle +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - * The MIT License (MIT) - * - * Copyright (c) 2019 vk.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - ******************************************************************************/ - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: '../../dependencies.gradle' - -android { - compileSdkVersion "$sdkVersions.compileSdk".toInteger() - buildToolsVersion "$sdkVersions.buildTools" - - defaultConfig { - applicationId = "com.vk.sdk.sample" - minSdkVersion "$sdkVersions.minSdk" - targetSdkVersion "$sdkVersions.targetSdk" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - lintOptions { - abortOnError true - checkReleaseBuilds true - } - - dexOptions { - preDexLibraries true - javaMaxHeapSize "5g" - } -} - -dependencies { - implementation sdkLibraries.kotlin - implementation sdkLibrariesSupport.recyclerView - implementation sdkLibrariesSupport.appCompat - implementation (sdkLibraries.picasso) { transitive = false } - implementation sdkLibraries.okHttp - - implementation project(':libapi-sdk-core') - implementation project(':libapi-sdk-api') - //implementation 'com.vk:androidsdk:2.0.0' -} diff --git a/samples/app/sdk/src/main/AndroidManifest.xml b/samples/app/sdk/src/main/AndroidManifest.xml deleted file mode 100644 index 1846374115..0000000000 --- a/samples/app/sdk/src/main/AndroidManifest.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/samples/app/sdk/src/main/java/com/vk/sdk/sample/PathUtils.kt b/samples/app/sdk/src/main/java/com/vk/sdk/sample/PathUtils.kt deleted file mode 100644 index 8233032c4a..0000000000 --- a/samples/app/sdk/src/main/java/com/vk/sdk/sample/PathUtils.kt +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * The MIT License (MIT) - * - * Copyright (c) 2019 vk.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - ******************************************************************************/ - -package com.vk.sdk.sample - -import android.content.Context -import android.net.Uri -import android.provider.MediaStore - -object PathUtils { - fun getPath(context: Context, uri: Uri): String { - if (uri.scheme == "file") { - if (uri.path != null) return uri.path!! - return "" - } - val proj = arrayOf(MediaStore.Images.Media.DATA) - val cursor = context.contentResolver.query(uri, proj, null, null, null) - val columnIndex = cursor!!.getColumnIndexOrThrow(MediaStore.Images.Media.DATA) - cursor.moveToFirst() - return "file://" + cursor.getString(columnIndex) - } -} \ No newline at end of file diff --git a/samples/app/sdk/src/main/java/com/vk/sdk/sample/SampleApplication.kt b/samples/app/sdk/src/main/java/com/vk/sdk/sample/SampleApplication.kt deleted file mode 100644 index 61301210ff..0000000000 --- a/samples/app/sdk/src/main/java/com/vk/sdk/sample/SampleApplication.kt +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * The MIT License (MIT) - * - * Copyright (c) 2019 vk.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - ******************************************************************************/ - -package com.vk.sdk.sample - -import android.app.Application -import com.vk.api.sdk.VK -import com.vk.api.sdk.VKTokenExpiredHandler - -class SampleApplication: Application() { - override fun onCreate() { - super.onCreate() - VK.addTokenExpiredHandler(tokenTracker) - } - - private val tokenTracker = object: VKTokenExpiredHandler { - override fun onTokenExpired() { - WelcomeActivity.startFrom(this@SampleApplication) - } - } -} \ No newline at end of file diff --git a/samples/app/sdk/src/main/java/com/vk/sdk/sample/UserActivity.kt b/samples/app/sdk/src/main/java/com/vk/sdk/sample/UserActivity.kt deleted file mode 100644 index d132bb57d6..0000000000 --- a/samples/app/sdk/src/main/java/com/vk/sdk/sample/UserActivity.kt +++ /dev/null @@ -1,217 +0,0 @@ -/******************************************************************************* - * The MIT License (MIT) - * - * Copyright (c) 2019 vk.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - ******************************************************************************/ - -package com.vk.sdk.sample - -import android.app.Activity -import android.content.Context -import android.content.Intent -import android.net.Uri -import android.os.Bundle -import android.text.TextUtils -import android.util.Log -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.widget.* -import androidx.recyclerview.widget.RecyclerView -import com.squareup.picasso.Picasso -import com.vk.api.sdk.VK -import com.vk.api.sdk.VKApiCallback -import com.vk.sdk.api.friends.dto.FriendsGetFieldsResponseDto -import com.vk.sdk.api.friends.methods.FriendsGetFields -import com.vk.sdk.api.users.dto.UsersFields -import com.vk.sdk.sample.models.VKUser -import com.vk.sdk.sample.requests.VKUsersCommand -import com.vk.sdk.sample.requests.VKWallPostCommand - -class UserActivity: Activity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_user) - - val logoutBtn = findViewById