diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cfb0bd8..84a6cbd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,10 +13,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'adopt' cache: gradle @@ -39,10 +39,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'adopt' - name: Run linter @@ -60,10 +60,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'adopt' - name: Kotlin linter diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 790ca8d..af25b0a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,10 +17,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'adopt' - name: Validate Gradle wrapper diff --git a/.scripts/ktlint.gradle b/.scripts/ktlint.gradle index 4a701a3..f580d5b 100644 --- a/.scripts/ktlint.gradle +++ b/.scripts/ktlint.gradle @@ -6,8 +6,8 @@ dependencies { ktlint "com.pinterest:ktlint:0.45.2" } -task ktlint(type: JavaExec) { - main = "com.pinterest.ktlint.Main" +tasks.register('ktlintFormat', JavaExec) { + mainClass = "com.pinterest.ktlint.Main" classpath = configurations.ktlint args("$rootDir/**/*.kt", "!$rootDir/**/build/**") jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED" @@ -19,3 +19,13 @@ task ktlint(type: JavaExec) { args "-F" } } + +tasks.register('ktlintCheck', JavaExec) { + classpath = configurations.ktlint + mainClass = "com.pinterest.ktlint.Main" + args "src/**/*.kt", "**.kts", "!**/build/**" +} + +tasks.preBuild.dependsOn ktlintFormat + +tasks.ktlintFormat.dependsOn ktlintCheck \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 1f00342..0970d8a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -77,6 +77,7 @@ android { excludes += '/META-INF/{AL2.0,LGPL2.1}' } } + namespace 'dev.arkbuilders.arkretouch' } dependencies { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1c79eac..30c6f3c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> + EditViewModel(primaryColor, launchedFromIntent, imagePath, imageUri, maxResolution, get()) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/dev/arkbuilders/arkretouch/edition/EditionModule.kt b/app/src/main/java/dev/arkbuilders/arkretouch/edition/EditionModule.kt deleted file mode 100644 index 2507df3..0000000 --- a/app/src/main/java/dev/arkbuilders/arkretouch/edition/EditionModule.kt +++ /dev/null @@ -1,13 +0,0 @@ -package dev.arkbuilders.arkretouch.edition - -import com.etherean.app.common.di.InjectionModule -import dev.arkbuilders.arkretouch.edition.ui.main.EditViewModel -import org.koin.androidx.viewmodel.dsl.viewModelOf -import org.koin.dsl.module - -object EditionModule : InjectionModule { - - override fun create() = module { - viewModelOf(::EditViewModel) - } -} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 5db3482..587c186 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.2.2' apply false - id 'com.android.library' version '7.2.2' apply false + id 'com.android.application' version '8.0.0' apply false + id 'com.android.library' version '8.0.0' apply false id 'org.jetbrains.kotlin.android' version '1.7.10' apply false } diff --git a/gradle.properties b/gradle.properties index b5987b6..a7cfaff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,3 +22,5 @@ kotlin.code.style=official # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library android.nonTransitiveRClass=true +android.defaults.buildfeatures.buildconfig=true +android.nonFinalResIds=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a7f80f2..a337077 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Tue Oct 18 23:46:27 ALMT 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME