Skip to content

Commit

Permalink
Updated depenencies;kotlin 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamKobus committed Dec 3, 2024
1 parent a7dae0f commit 9b36f14
Show file tree
Hide file tree
Showing 243 changed files with 2,149 additions and 1,774 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[*.{kt,kts}]
ktlint_function_naming_ignore_when_annotated_with = Composable
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_string-template-indent = disabled
ktlint_standard_annotation = disabled = disabled
ktlint_code_style = intellij_idea
8 changes: 6 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,24 @@ jobs:
publish:
name: Publish release build
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Decrypt secrets
run: scripts/decrypt-secrets.sh "${{ secrets.SECRETS_PASSPHRASE }}"

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Decrypt secrets
run: scripts/decrypt-secrets.sh "${{ secrets.SECRETS_PASSPHRASE }}"

Expand Down
26 changes: 10 additions & 16 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,26 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v2

- uses: gradle/wrapper-validation-action@v1
- uses: actions/checkout@v4

- name: Configure JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'

- name: Set Up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true

- name: Danger Checks
run: |
./gradlew dependencyUpdates -DoutputDir=build/danger
bundle exec danger
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Run tests
run: ./gradlew testDebugUnitTest

- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: success() || failure()
with:
report_paths: '**/build/test-results/**/TEST-*.xml'

- name: Run static analysis
run: ./gradlew ktlintCheck detekt
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ signing.gpg
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/deploymentTargetDropDown.xml
.idea/deploymentTargetSelector.xml
.idea/inspectionProfiles/Project_Default.xml
gradle.xml
*.iml

Expand Down
16 changes: 16 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 0 additions & 20 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@

### Changes

# 1.0.0

### Changes

- Updated Kotlin to `2.0.0`
- Switched to version catalogs for dependency management.
- Updated to Jetpack Compose BoM `2024.11.00`
- Accompanist navigation got replaced with AndroidX library.

Migration:
- Replace `rememberAnimatedNavController()` with `rememberNavController()`

# 0.3.4

### Changes
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repositories {
}
dependencies {
implementation "com.adamkobus:compose-navigation:0.3.0"
implementation "com.adamkobus:compose-navigation:1.0.0"
}
```

Expand All @@ -34,7 +34,7 @@ repositories {
}
dependencies {
implementation "com.adamkobus:compose-navigation:0.3.0-SNAPSHOT"
implementation "com.adamkobus:compose-navigation:1.0.0-SNAPSHOT"
}
```

Expand Down
64 changes: 11 additions & 53 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,60 +1,18 @@
import com.adamkobus.compose.navigation.Lib

apply plugin: "io.github.gradle-nexus.publish-plugin"
apply plugin: "com.github.ben-manes.versions"

buildscript {
ext {
// https://github.com/JLLeitschuh/ktlint-gradle/releases
ktlintPluginVersion = "11.5.0"

// https://github.com/detekt/detekt/releases
detektPluginVersion = "1.21.0"

// https://github.com/ben-manes/gradle-versions-plugin/releases
versionsPluginVersion = "0.47.0"

// https://github.com/gradle-nexus/publish-plugin/releases
publishPluginVersion = "1.3.0"

// https://developer.android.com/studio/releases/gradle-plugin
androidBuildtoolsPluginVersion = '8.0.2'
}

repositories {
google()
mavenCentral()
gradlePluginPortal()
}

dependencies {
classpath "com.android.tools.build:gradle:$androidBuildtoolsPluginVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${Lib.KOTLIN_VERSION}"
classpath "com.google.dagger:hilt-android-gradle-plugin:${Lib.HILT_VERSION}"
classpath "org.jlleitschuh.gradle:ktlint-gradle:$ktlintPluginVersion"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektPluginVersion"
classpath "com.github.ben-manes:gradle-versions-plugin:$versionsPluginVersion"
classpath "io.github.gradle-nexus:publish-plugin:$publishPluginVersion"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${Lib.DOKKA_VERSION}"
}
rootProject.ext
}

task clean(type: Delete) {
delete rootProject.buildDir
}

allprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}
}
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.dokka) apply false
alias(libs.plugins.detekt) apply false
alias(libs.plugins.ktlint) apply false
alias(libs.plugins.kotlin.ksp) apply false
alias(libs.plugins.nexus.publish)
}

apply from: "gradle/utils.gradle"
apply from: "gradle/version.gradle"
apply from: "gradle/dependency-updates.gradle"
apply from: "gradle/android-setup.gradle"
apply from: "gradle/publishing-root.gradle"
apply from: "gradle/dokka-config.gradle"
1 change: 0 additions & 1 deletion buildSrc/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions buildSrc/build.gradle.kts

This file was deleted.

Binary file added buildSrc/build/libs/buildSrc.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions buildSrc/build/tmp/jar/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

38 changes: 17 additions & 21 deletions composenav/build.gradle
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
import com.adamkobus.compose.navigation.Lib

plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'org.jetbrains.dokka'
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.dokka)
alias(libs.plugins.kotlin.compose)
}

android {
namespace 'com.adamkobus.compose.navigation'
namespace "com.adamkobus.compose.navigation"
}

dependencies {
implementation Lib.AndroidX.Core
implementation Lib.AndroidX.Appcompat
implementation Lib.Kotlin.Coroutines
implementation Lib.Google.Material
implementation Lib.AdamKobus.LifecycleAwareViewModel
implementation libs.androidx.core
implementation libs.androidx.appcompat
implementation libs.androidx.composenavigation
implementation libs.kotlin.coroutines

// compose
implementation Lib.Compose.Ui
implementation Lib.Compose.Activity
implementation Lib.Compose.Material
implementation Lib.Compose.ToolingPreview
debugImplementation Lib.Compose.UiTooling
implementation platform(libs.compose.bom)
implementation libs.compose.ui
implementation libs.compose.tooling.preview
debugImplementation libs.compose.tooling.ui

implementation Lib.Accompanist.NavigationAnimation
implementation libs.ak.lifecycle.vm

// testing
testImplementation Lib.Test.JUnit
testImplementation Lib.Test.Mockk
testImplementation Lib.Test.CoroutinesTest
testImplementation libs.test.junit
testImplementation libs.test.mockk
testImplementation libs.test.coroutines
}

ext {
Expand Down
Loading

0 comments on commit 9b36f14

Please sign in to comment.