From 06112e0ebd6739dca825408a0c32b488338d0c80 Mon Sep 17 00:00:00 2001 From: IUADE0FY Date: Tue, 6 Aug 2024 18:15:49 +0300 Subject: [PATCH 01/15] Bump Kotlin to 2.0.0 --- buildSrc/build.gradle.kts | 2 +- buildSrc/src/main/java/Dependencies.kt | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 6c6f059..0f361c8 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -25,5 +25,5 @@ repositories { dependencies { implementation("com.android.tools.build:gradle:7.2.2") - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0") + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0") } \ No newline at end of file diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 6628019..d05517b 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -28,7 +28,6 @@ object appConfig { val javaCompatibilityVersion = JavaVersion.VERSION_1_8 val kotlinCompatibilityVersion = JavaVersion.VERSION_1_8 - } @@ -53,13 +52,12 @@ object publishingConfig { const val artifactName = "persistentsearchview" const val artifactVersion = "1.1.4" const val artifactDescription = "An android library designed to simplify the process of implementing search-related functionality." - } object versions { - const val kotlin = "1.7.0" // also in buildSrc build.gradle.kts file + const val kotlin = "2.0.0" // also in buildSrc build.gradle.kts file const val gradlePlugin = "7.2.2" // also in buildSrc build.gradle.kts file const val gradleVersionsPlugin = "0.42.0" const val appCompat = "1.4.2" @@ -72,7 +70,6 @@ object versions { const val commonsKtx = "1.0.4" const val jUnit = "4.13.2" const val testRunner = "1.3.0" - } @@ -87,9 +84,7 @@ object deps { } object local { - const val persistentSearchView = ":persistentsearchview" - } const val appCompat = "androidx.appcompat:appcompat:${versions.appCompat}" @@ -102,5 +97,4 @@ object deps { const val commonsKtx = "com.paulrybitskyi.commons:commons-ktx:${versions.commonsKtx}" const val jUnit = "junit:junit:${versions.jUnit}" const val testRunner = "androidx.test:runner:${versions.testRunner}" - } \ No newline at end of file From 437295eff8696b4c2e91ea804d71dc3666b9aa26 Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 18:19:00 +0300 Subject: [PATCH 02/15] Bump AGP to 8.3.1 --- buildSrc/build.gradle.kts | 2 +- buildSrc/src/main/java/Dependencies.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 0f361c8..85f43b4 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -24,6 +24,6 @@ repositories { } dependencies { - implementation("com.android.tools.build:gradle:7.2.2") + implementation("com.android.tools.build:gradle:8.3.1") implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0") } \ No newline at end of file diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index d05517b..b8a6df4 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -58,7 +58,7 @@ object publishingConfig { object versions { const val kotlin = "2.0.0" // also in buildSrc build.gradle.kts file - const val gradlePlugin = "7.2.2" // also in buildSrc build.gradle.kts file + const val gradlePlugin = "8.3.1" // also in buildSrc build.gradle.kts file const val gradleVersionsPlugin = "0.42.0" const val appCompat = "1.4.2" const val cardView = "1.0.0" From b3bd521d0166fad721c34d3574954a239dd7771b Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 18:20:29 +0300 Subject: [PATCH 03/15] Bump CI's JDK version to 17 --- .github/workflows/build.yml | 12 ++++++------ .github/workflows/release.yml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0d665b..2b65cd2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,11 +16,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: '11' + java-version: '17' - name: Generate a Cache Key run: ./checksum.sh checksum.txt @@ -50,11 +50,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: '11' + java-version: '17' - name: Generate a Cache Key run: ./checksum.sh checksum.txt @@ -84,11 +84,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: '11' + java-version: '17' - name: Generate a Cache Key run: ./checksum.sh checksum.txt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a445c29..b5c693d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,11 +13,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: '11' + java-version: '17' - name: Generate a Cache Key run: ./checksum.sh checksum.txt From 81f1bb0d80446799a2701b99d2b8037d3e28b11b Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 18:21:47 +0300 Subject: [PATCH 04/15] Bump Gradle to 8.5 --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index eea3be5..2e3a9f5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip From 110a509cf166a19e4ae9def6a1164916e754fe77 Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 18:24:32 +0300 Subject: [PATCH 05/15] Set namespace for Android modules --- buildSrc/src/main/java/Dependencies.kt | 4 ++-- persistentsearchview/build.gradle.kts | 1 + sample/build.gradle.kts | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index b8a6df4..015e5d0 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -58,7 +58,7 @@ object publishingConfig { object versions { const val kotlin = "2.0.0" // also in buildSrc build.gradle.kts file - const val gradlePlugin = "8.3.1" // also in buildSrc build.gradle.kts file + const val androidPlugin = "8.3.1" // also in buildSrc build.gradle.kts file const val gradleVersionsPlugin = "0.42.0" const val appCompat = "1.4.2" const val cardView = "1.0.0" @@ -77,7 +77,7 @@ object deps { object plugins { - const val androidGradle = "com.android.tools.build:gradle:${versions.gradlePlugin}" + const val androidGradle = "com.android.tools.build:gradle:${versions.androidPlugin}" const val kotlinGradle = "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" const val gradleVersions = "com.github.ben-manes:gradle-versions-plugin:${versions.gradleVersionsPlugin}" diff --git a/persistentsearchview/build.gradle.kts b/persistentsearchview/build.gradle.kts index eba95cb..bebeead 100644 --- a/persistentsearchview/build.gradle.kts +++ b/persistentsearchview/build.gradle.kts @@ -22,6 +22,7 @@ android { compileSdk = appConfig.compileSdkVersion defaultConfig { + namespace = "com.paulrybitskyi.persistentsearchview" minSdk = appConfig.minSdkVersion targetSdk = appConfig.targetSdkVersion diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index f2cdc07..bffa532 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -24,6 +24,7 @@ android { defaultConfig { applicationId = appConfig.applicationId + namespace = appConfig.applicationId minSdk = appConfig.minSdkVersion targetSdk = appConfig.targetSdkVersion From 2a1ef9a52d00c5812c299101020191f6441cb262 Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 18:27:02 +0300 Subject: [PATCH 06/15] Bump Gradle Versions plugin to 0.51.0 --- build.gradle.kts | 11 ++++++++++- buildSrc/src/main/java/Dependencies.kt | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8a54070..a724699 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,6 +14,8 @@ * limitations under the License. */ +import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask + plugins { gradleVersions() } @@ -31,12 +33,19 @@ buildscript { } } +tasks.withType { + rejectVersionIf { + listOf("alpha", "beta", "rc").any { keyword -> + candidate.version.lowercase().contains(keyword) + } + } +} + allprojects { repositories { mavenCentral() google() maven { url = uri("https://jitpack.io") } - //jcenter() // adapster library has not migrated yet } } diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 015e5d0..7a4d422 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -59,7 +59,7 @@ object versions { const val kotlin = "2.0.0" // also in buildSrc build.gradle.kts file const val androidPlugin = "8.3.1" // also in buildSrc build.gradle.kts file - const val gradleVersionsPlugin = "0.42.0" + const val gradleVersionsPlugin = "0.51.0" const val appCompat = "1.4.2" const val cardView = "1.0.0" const val browser = "1.4.0" From fcf05c6f8c9294134391aea312bb5c64ef70b4f9 Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 19:04:08 +0300 Subject: [PATCH 07/15] Fix publishing script --- persistentsearchview/build.gradle.kts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/persistentsearchview/build.gradle.kts b/persistentsearchview/build.gradle.kts index bebeead..9bfdb63 100644 --- a/persistentsearchview/build.gradle.kts +++ b/persistentsearchview/build.gradle.kts @@ -21,6 +21,13 @@ plugins { android { compileSdk = appConfig.compileSdkVersion + publishing { + singleVariant(publishingConfig.mavenPublicationName) { + withJavadocJar() + withSourcesJar() + } + } + defaultConfig { namespace = "com.paulrybitskyi.persistentsearchview" minSdk = appConfig.minSdkVersion From 3ba7c23de3d5d6c49c98a4084eb2c5e3646206dc Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 19:06:57 +0300 Subject: [PATCH 08/15] Bump AppCompat to 1.7.0 --- buildSrc/src/main/java/Dependencies.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 7a4d422..5d8be86 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -60,7 +60,7 @@ object versions { const val kotlin = "2.0.0" // also in buildSrc build.gradle.kts file const val androidPlugin = "8.3.1" // also in buildSrc build.gradle.kts file const val gradleVersionsPlugin = "0.51.0" - const val appCompat = "1.4.2" + const val appCompat = "1.7.0" const val cardView = "1.0.0" const val browser = "1.4.0" const val recyclerView = "1.2.1" From 06278a226f5ff510c32a246c30c6deeb399d11fe Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 19:07:48 +0300 Subject: [PATCH 09/15] Bump compile and taget SDK versions to 34 --- buildSrc/src/main/java/Dependencies.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 5d8be86..94cdbcd 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -21,8 +21,8 @@ import org.gradle.api.JavaVersion object appConfig { - const val compileSdkVersion = 32 - const val targetSdkVersion = 32 + const val compileSdkVersion = 34 + const val targetSdkVersion = 34 const val minSdkVersion = 21 const val applicationId = "com.paulrybitskyi.persistentsearchview.sample" From 83fdbbf01e1890560c2d112215f75fd0a1834b32 Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 19:21:19 +0300 Subject: [PATCH 10/15] Fix build issues --- .../persistentsearchview/sample/DemoActivity.kt | 1 + .../sample/adapters/model/UserItem.kt | 11 ++--------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/sample/src/main/java/com/paulrybitskyi/persistentsearchview/sample/DemoActivity.kt b/sample/src/main/java/com/paulrybitskyi/persistentsearchview/sample/DemoActivity.kt index 30e1bbf..fbf3b0f 100644 --- a/sample/src/main/java/com/paulrybitskyi/persistentsearchview/sample/DemoActivity.kt +++ b/sample/src/main/java/com/paulrybitskyi/persistentsearchview/sample/DemoActivity.kt @@ -31,6 +31,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import com.arthurivanets.adapster.listeners.OnItemClickListener import com.paulrybitskyi.commons.ktx.* import com.paulrybitskyi.persistentsearchview.PersistentSearchView +import com.paulrybitskyi.persistentsearchview.R import com.paulrybitskyi.persistentsearchview.adapters.model.SuggestionItem import com.paulrybitskyi.persistentsearchview.listeners.OnSearchConfirmedListener import com.paulrybitskyi.persistentsearchview.listeners.OnSearchQueryChangeListener diff --git a/sample/src/main/java/com/paulrybitskyi/persistentsearchview/sample/adapters/model/UserItem.kt b/sample/src/main/java/com/paulrybitskyi/persistentsearchview/sample/adapters/model/UserItem.kt index 1bbb767..9762721 100644 --- a/sample/src/main/java/com/paulrybitskyi/persistentsearchview/sample/adapters/model/UserItem.kt +++ b/sample/src/main/java/com/paulrybitskyi/persistentsearchview/sample/adapters/model/UserItem.kt @@ -37,13 +37,6 @@ import com.paulrybitskyi.persistentsearchview.sample.model.User internal class UserItem(itemModel: User): BaseItem(itemModel) { - companion object { - - const val MAIN_LAYOUT = R.layout.item_user - - } - - override fun init( adapter: Adapter>?, parent: ViewGroup, inflater: LayoutInflater, @@ -51,7 +44,7 @@ internal class UserItem(itemModel: User): BaseItem(itemView) { From ec03430f454007dac4d808c98f55270b5377b4d8 Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 19:22:50 +0300 Subject: [PATCH 11/15] Bump Browser to 1.8.0 --- buildSrc/src/main/java/Dependencies.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 94cdbcd..3aaa874 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -62,7 +62,7 @@ object versions { const val gradleVersionsPlugin = "0.51.0" const val appCompat = "1.7.0" const val cardView = "1.0.0" - const val browser = "1.4.0" + const val browser = "1.8.0" const val recyclerView = "1.2.1" const val adapster = "1.0.13" const val annotations = "1.4.0" From 8cb50234143e9fdfd075e46dbf09931b98c03592 Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 19:23:30 +0300 Subject: [PATCH 12/15] Bump RecyclerView to 1.3.2 --- buildSrc/src/main/java/Dependencies.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 3aaa874..dc49f15 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -63,7 +63,7 @@ object versions { const val appCompat = "1.7.0" const val cardView = "1.0.0" const val browser = "1.8.0" - const val recyclerView = "1.2.1" + const val recyclerView = "1.3.2" const val adapster = "1.0.13" const val annotations = "1.4.0" const val coreKtx = "1.8.0" From d5529e0eb58ee502c9aa08fd47c7fdcb0c127a56 Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 19:24:07 +0300 Subject: [PATCH 13/15] Bump Annotations to 1.8.1 --- buildSrc/src/main/java/Dependencies.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index dc49f15..0617d2d 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -65,7 +65,7 @@ object versions { const val browser = "1.8.0" const val recyclerView = "1.3.2" const val adapster = "1.0.13" - const val annotations = "1.4.0" + const val annotations = "1.8.1" const val coreKtx = "1.8.0" const val commonsKtx = "1.0.4" const val jUnit = "4.13.2" From a0366e40c134f243dff7251f5334da5a9eed012f Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 19:24:32 +0300 Subject: [PATCH 14/15] Bump CoreKtx to 1.13.1 --- buildSrc/src/main/java/Dependencies.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 0617d2d..ae860e8 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -66,7 +66,7 @@ object versions { const val recyclerView = "1.3.2" const val adapster = "1.0.13" const val annotations = "1.8.1" - const val coreKtx = "1.8.0" + const val coreKtx = "1.13.1" const val commonsKtx = "1.0.4" const val jUnit = "4.13.2" const val testRunner = "1.3.0" From 9d9ce74b65a16ce51f003ca63db24b923391ee92 Mon Sep 17 00:00:00 2001 From: mars885 Date: Tue, 6 Aug 2024 19:25:11 +0300 Subject: [PATCH 15/15] Bump TestRunner to 1.6.1 --- buildSrc/src/main/java/Dependencies.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index ae860e8..811f8b1 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -69,7 +69,7 @@ object versions { const val coreKtx = "1.13.1" const val commonsKtx = "1.0.4" const val jUnit = "4.13.2" - const val testRunner = "1.3.0" + const val testRunner = "1.6.1" }