Skip to content

Commit

Permalink
Refresh dependencies to latest stable (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
romansavka-mq authored Jul 23, 2024
1 parent 02f0197 commit 428a872
Show file tree
Hide file tree
Showing 83 changed files with 1,259 additions and 319 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
java-version: '17'
distribution: 'liberica'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run code analysis and tests
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
**/local.properties
**/build

# Kotlin
.kotlin

# OS
.DS_Store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Using this artifact provides additional kotlin extension methods for:

The repository contains few samples - showcasing:
- koin integration [sample-koin](/sample-koin)
- **TBD** hilt integration [sample-hilt](/sample-hilt)
- hilt integration [sample-hilt](/sample-hilt)
- **TBD** compose destination integration [sample-destinations](/sample-destinations)

## About
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
alias libs.plugins.android.application apply false
alias libs.plugins.android.library apply false
alias libs.plugins.kotlin.jvm apply false
alias libs.plugins.kotlin.android apply false
alias libs.plugins.kotlin.kapt apply false
alias libs.plugins.hilt apply false
Expand Down
7 changes: 6 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
android.useAndroidX=true
kotlin.code.style=official
android.nonTransitiveRClass=true
android.disableAutomaticComponentCreation=true

# https://github.com/ben-manes/gradle-versions-plugin/issues/859#issuecomment-2043927211
# https://docs.gradle.org/current/userguide/upgrading_version_8.html#xml_parsing_now_requires_recent_parsers
systemProp.javax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
systemProp.javax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
systemProp.javax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
7 changes: 7 additions & 0 deletions gradle/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[*.{kt,kts}]
ktlint_code_style = android_studio
ktlint_function_naming_ignore_when_annotated_with = Composable
ktlint_standard_import-ordering = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_class-signature = disabled
ktlint_standard_function-expression-body = disabled
ktlint_standard_enum-wrapping = disabled
indent_size = 4
ij_continuation_indent_size = 4
insert_final_newline = true
Expand Down
8 changes: 1 addition & 7 deletions gradle/commonModuleSetup.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ def setupAndroid(isApp) {
buildTypes.release.minifyEnabled false
}

/* remove after https://issuetracker.google.com/issues/260059413 */
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

lintOptions {
checkDependencies true
checkReleaseBuilds false
Expand Down Expand Up @@ -89,7 +83,7 @@ def setupKspSourceSets(variants) {
def name = variant.name
kotlin.sourceSets {
getByName(name) {
kotlin.srcDirs += ["$buildDir/generated/ksp/$name/kotlin"]
kotlin.srcDirs += ["$layout.buildDirectory/generated/ksp/$name/kotlin"]
}
}
}
Expand Down
26 changes: 9 additions & 17 deletions gradle/dependencyUpdates.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ["alpha", "beta", "rc", "cr", "m", "preview"].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject("Release candidate")
}
}
}
def isNonStable = { String version ->
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}

tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}

versionCatalogUpdate {
sortByKey = false

keep {
keepUnusedVersions = true
keepUnusedLibraries = true
keepUnusedPlugins = true
}
}
Loading

0 comments on commit 428a872

Please sign in to comment.