Skip to content

Commit

Permalink
Update dependencies (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
mars885 authored Aug 6, 2024
1 parent 251aa5a commit cfd6913
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 39 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask

plugins {
gradleVersions()
}
Expand All @@ -31,12 +33,19 @@ buildscript {
}
}

tasks.withType<DependencyUpdatesTask> {
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
}
}

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ repositories {
}

dependencies {
implementation("com.android.tools.build:gradle:7.2.2")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0")
implementation("com.android.tools.build:gradle:8.3.1")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0")
}
30 changes: 12 additions & 18 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ 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"

val javaCompatibilityVersion = JavaVersion.VERSION_1_8
val kotlinCompatibilityVersion = JavaVersion.VERSION_1_8

}


Expand All @@ -53,43 +52,39 @@ 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 gradlePlugin = "7.2.2" // also in buildSrc build.gradle.kts file
const val gradleVersionsPlugin = "0.42.0"
const val appCompat = "1.4.2"
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.7.0"
const val cardView = "1.0.0"
const val browser = "1.4.0"
const val recyclerView = "1.2.1"
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 coreKtx = "1.8.0"
const val annotations = "1.8.1"
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"
}


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}"

}

object local {

const val persistentSearchView = ":persistentsearchview"

}

const val appCompat = "androidx.appcompat:appcompat:${versions.appCompat}"
Expand All @@ -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}"

}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions persistentsearchview/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ plugins {
android {
compileSdk = appConfig.compileSdkVersion

publishing {
singleVariant(publishingConfig.mavenPublicationName) {
withJavadocJar()
withSourcesJar()
}
}

defaultConfig {
namespace = "com.paulrybitskyi.persistentsearchview"
minSdk = appConfig.minSdkVersion
targetSdk = appConfig.targetSdkVersion

Expand Down
1 change: 1 addition & 0 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ android {

defaultConfig {
applicationId = appConfig.applicationId
namespace = appConfig.applicationId
minSdk = appConfig.minSdkVersion
targetSdk = appConfig.targetSdkVersion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,14 @@ import com.paulrybitskyi.persistentsearchview.sample.model.User
internal class UserItem(itemModel: User): BaseItem<User, UserItem.ViewHolder, UserResources>(itemModel) {


companion object {

const val MAIN_LAYOUT = R.layout.item_user

}


override fun init(
adapter: Adapter<out Item<RecyclerView.ViewHolder, ItemResources>>?,
parent: ViewGroup, inflater: LayoutInflater,
resources: UserResources?
): ViewHolder {
return ViewHolder(
inflater.inflate(
MAIN_LAYOUT,
layout,
parent,
false
)
Expand Down Expand Up @@ -149,7 +142,7 @@ internal class UserItem(itemModel: User): BaseItem<User, UserItem.ViewHolder, Us
}


override fun getLayout(): Int = MAIN_LAYOUT
override fun getLayout(): Int = R.layout.item_user


class ViewHolder(itemView: View) : BaseItem.ViewHolder<User>(itemView) {
Expand Down

0 comments on commit cfd6913

Please sign in to comment.