Skip to content

Commit

Permalink
Various version updates
Browse files Browse the repository at this point in the history
  • Loading branch information
findjigar committed Nov 13, 2024
1 parent 4449c6f commit 1bdcf8c
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 89 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/KaMPKit-Android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17

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

- name: Build
run: ./gradlew build

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/KaMPKit-iOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17

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

- name: Run tests
run: ./gradlew :shared:iosX64Test

Expand Down
14 changes: 6 additions & 8 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ android {
targetSdk = libs.versions.targetSdk.get().toInt()
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
Expand All @@ -27,11 +26,6 @@ android {
}
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
lint {
warningsAsErrors = false
Expand All @@ -42,14 +36,18 @@ android {
compose = true
buildConfig = true
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
}

dependencies {
implementation(project(":shared"))
implementation(projects.shared)
implementation(libs.bundles.app.ui)
implementation(libs.multiplatformSettings.common)
implementation(libs.kotlinx.dateTime)
coreLibraryDesugaring(libs.android.desugaring)
implementation(libs.koin.android)
testImplementation(libs.junit)
}
12 changes: 0 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,9 @@ subprojects {
apply(plugin = rootProject.libs.plugins.ktlint.get().pluginId)

configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
version.set("1.1.1")
enableExperimentalRules.set(true)
verbose.set(true)
filter {
exclude { it.file.path.contains("build/") }
}
}

afterEvaluate {
tasks.named("check").configure {
dependsOn(tasks.getByName("ktlintCheck"))
}
}
}

tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
51 changes: 20 additions & 31 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,30 @@
[versions]
## SDK Versions
minSdk = "21"
targetSdk = "34"
compileSdk = "34"
targetSdk = "35"
compileSdk = "35"

# Dependencies
kotlin = "2.0.0"

android-gradle-plugin = "8.2.0"
ktlint-gradle = "12.1.0"

compose = "1.6.7"

android-desugaring = "2.0.4"
androidx-core = "1.13.1"
androidx-test-junit = "1.1.5"
androidx-activity-compose = "1.9.0"
# TODO: Update to 2.8.+ when updating to Compose 1.7.+
androidx-lifecycle = "2.7.0"

kotlin = "2.0.21"
android-gradle-plugin = "8.5.2"
ktlint-gradle = "12.1.1"
compose = "1.7.5"
android-desugaring = "2.1.3"
androidx-core = "1.15.0"
androidx-test-junit = "1.2.1"
androidx-activity-compose = "1.9.3"
androidx-lifecycle = "2.8.7"
junit = "4.13.2"

coroutines = "1.8.1"
kotlinx-datetime = "0.6.0"
ktor = "2.3.11"

robolectric = "4.10.3"

kermit = "2.0.3"
skie = "0.8.0"

coroutines = "1.9.0"
kotlinx-datetime = "0.6.1"
ktor = "3.0.1"
robolectric = "4.13"
kermit = "2.0.4"
skie = "0.9.3"
koin = "3.5.3"
multiplatformSettings = "1.1.1"
turbine = "1.0.0"
sqlDelight = "2.0.1"
multiplatformSettings = "1.2.0"
turbine = "1.2.0"
sqlDelight = "2.0.2"

[libraries]
android-desugaring = { module = "com.android.tools:desugar_jdk_libs", version.ref = "android-desugaring" }
Expand All @@ -52,8 +43,6 @@ compose-activity = { module = "androidx.activity:activity-compose", version.ref
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }

junit = { module = "junit:junit", version.ref = "junit" }

koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" }
koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
koin-test = { module = "io.insert-koin:koin-test", version.ref = "koin" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 9 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
24 changes: 21 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

pluginManagement {
repositories {
gradlePluginPortal()
google()
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
}

dependencyResolutionManagement {
@Suppress("UnstableApiUsage")
repositories {
google()
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}

include(":app", ":shared")
rootProject.name = "KaMPKit"
13 changes: 4 additions & 9 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlin.multiplatform)
Expand All @@ -15,7 +14,6 @@ android {
compileSdk = libs.versions.compileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
@Suppress("UnstableApiUsage")
testOptions {
Expand All @@ -28,16 +26,13 @@ android {
warningsAsErrors = true
abortOnError = true
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}

version = "1.2"

kotlin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class SqlDelightTest {
dbHelper.deleteAll()

assertTrue(
dbHelper.selectAllItems().first().count() == 0,
dbHelper.selectAllItems().first().isEmpty(),
"Delete All did not work"
)
}
Expand Down

0 comments on commit 1bdcf8c

Please sign in to comment.