Skip to content

Commit

Permalink
Raise to Kotlin 1.9.0 (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
thebino committed Aug 16, 2023
1 parent a5fe1c0 commit c4f3350
Show file tree
Hide file tree
Showing 22 changed files with 70 additions and 50 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/continuous-delivery-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
java-version: 17

- name: Make gradlew executable
run: chmod +x ./gradlew
Expand All @@ -47,10 +48,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
java-version: 17

- name: Make gradlew executable
run: chmod +x ./gradlew
Expand Down Expand Up @@ -83,10 +85,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
java-version: 17

- name: Cache between builds
uses: actions/cache@v2
Expand Down Expand Up @@ -120,10 +123,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
java-version: 17

- name: Cache between builds
uses: actions/cache@v2
Expand Down Expand Up @@ -185,10 +189,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
java-version: 17

- name: Cache between builds
uses: actions/cache@v2
Expand Down Expand Up @@ -250,10 +255,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
java-version: 17

- name: Cache between builds
uses: actions/cache@v2
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/promote-release-in-playstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
java-version: 17

- name: Decode Gradle Play Publisher Credentials
id: decode_play_store_credentials
Expand Down
2 changes: 1 addition & 1 deletion .idea/compiler.xml

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

2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ android {
}
}

packagingOptions {
packaging {
resources.excludes += "META-INF/AL2.0"
resources.excludes += "META-INF/LGPL2.1"
resources.excludes += "META-INF/licenses/ASM"
Expand Down
14 changes: 14 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,17 @@

# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault

# generated by the Android Gradle plugin
-dontwarn com.google.errorprone.annotations.Immutable
-dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.BCSSLSocket
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
-dontwarn org.conscrypt.Conscrypt$Version
-dontwarn org.conscrypt.Conscrypt
-dontwarn org.conscrypt.ConscryptHostnameVerifier
-dontwarn org.gradle.api.Plugin
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE
-dontwarn org.slf4j.impl.StaticLoggerBinder
5 changes: 2 additions & 3 deletions app/src/main/kotlin/photos/network/ui/SearchBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import com.google.accompanist.insets.LocalWindowInsets
import photos.network.R

class SearchContentProvider : PreviewParameterProvider<String> {
override val values = sequenceOf("Searchphrase", "")
Expand All @@ -68,7 +67,7 @@ fun SearchViewPreview(@PreviewParameter(SearchContentProvider::class) search: St
value = textState.value,
onValueChange = { newTextFieldValue -> textState.value = newTextFieldValue },
onSearch = {},
hint = stringResource(id = R.string.search_hint),
hint = stringResource(id = photos.network.ui.common.R.string.search_hint),
)
}
}
Expand All @@ -79,7 +78,7 @@ fun Searchbar(
value: TextFieldValue,
onValueChange: (TextFieldValue) -> Unit,
onSearch: () -> Unit = {},
hint: String = stringResource(id = R.string.search_hint),
hint: String = stringResource(id = photos.network.ui.common.R.string.search_hint),
maxLength: Int = 200,
keyboardOptions: KeyboardOptions = KeyboardOptions.Default.copy(
imeAction = ImeAction.Search,
Expand Down
2 changes: 1 addition & 1 deletion domain/albums/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}

packagingOptions {
packaging {
resources.excludes += "META-INF/AL2.0"
resources.excludes += "META-INF/LGPL2.1"
}
Expand Down
2 changes: 1 addition & 1 deletion domain/folders/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}

packagingOptions {
packaging {
resources.excludes += "META-INF/AL2.0"
resources.excludes += "META-INF/LGPL2.1"
}
Expand Down
2 changes: 1 addition & 1 deletion domain/photos/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}

packagingOptions {
packaging {
resources.excludes += "META-INF/AL2.0"
resources.excludes += "META-INF/LGPL2.1"
}
Expand Down
2 changes: 1 addition & 1 deletion domain/search/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}

packagingOptions {
packaging {
resources.excludes += "META-INF/AL2.0"
resources.excludes += "META-INF/LGPL2.1"
}
Expand Down
2 changes: 1 addition & 1 deletion domain/settings/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}

packagingOptions {
packaging {
resources.excludes += "META-INF/AL2.0"
resources.excludes += "META-INF/LGPL2.1"
}
Expand Down
2 changes: 1 addition & 1 deletion domain/sharing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ android {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}

packagingOptions {
packaging {
resources.excludes += "META-INF/AL2.0"
resources.excludes += "META-INF/LGPL2.1"
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand Down
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[versions]
compileSdk = "33"
compileSdk = "34"

# https://kotlinlang.org/
kotlin = "1.8.10" # 1.8.21
kotlin = "1.9.0"

# https://github.com/google/ksp
ksp = "1.8.10-1.0.9" # 1.8.21-1.0.11
ksp = "1.9.0-1.0.13"

# https://developer.android.com/build/releases/gradle-plugin
androidGradlePlugin = "7.4.0" # 8.0.0
androidGradlePlugin = "8.1.0"

# https://developer.android.com/jetpack/compose/bom
compose-bom = "2023.03.00" # 2023.04.01
compose-bom = "2023.08.00"

# https://developer.android.com/jetpack/androidx/releases/compose-compiler
compose-compiler = "1.4.2" # 1.4.7
compose-compiler = "1.5.1"

# https://detekt.dev/
detekt = "1.22.0"
Expand Down
2 changes: 1 addition & 1 deletion repository/folders/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ android {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}

packagingOptions {
packaging {
resources.excludes += "META-INF/AL2.0"
resources.excludes += "META-INF/LGPL2.1"
resources.excludes += "META-INF/licenses/ASM"
Expand Down
2 changes: 1 addition & 1 deletion repository/photos/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ android {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}

packagingOptions {
packaging {
resources.excludes += "META-INF/AL2.0"
resources.excludes += "META-INF/LGPL2.1"
resources.excludes += "META-INF/licenses/ASM"
Expand Down
2 changes: 1 addition & 1 deletion repository/settings/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ android {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}

packagingOptions {
packaging {
resources.excludes += "META-INF/AL2.0"
resources.excludes += "META-INF/LGPL2.1"
resources.excludes += "META-INF/licenses/ASM"
Expand Down
2 changes: 1 addition & 1 deletion repository/sharing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ android {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}

packagingOptions {
packaging {
resources.excludes += "META-INF/AL2.0"
resources.excludes += "META-INF/LGPL2.1"
resources.excludes += "META-INF/licenses/ASM"
Expand Down
9 changes: 4 additions & 5 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ pluginManagement {
}

plugins {
kotlin("android").version("1.8.10")
id("com.android.application").version("7.4.0")
id("com.android.library").version("7.4.0")
// kotlin("kapt").version("1.8.10")
id("com.google.devtools.ksp").version("1.8.10-1.0.9")
kotlin("android").version("1.9.0")
id("com.android.application").version("8.1.0")
id("com.android.library").version("8.1.0")
id("com.google.devtools.ksp").version("1.9.0-1.0.13")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ internal fun SearchHeader(
.padding(top = 32.dp)
.testTag("SEARCH_HEADER_TITLE")
.fillMaxWidth(),
text = stringResource(id = R.string.app_name_full),
text = stringResource(id = photos.network.ui.common.R.string.app_name_full),
style = MaterialTheme.typography.headlineLarge,
textAlign = TextAlign.Center,
color = Color.White,
Expand Down
1 change: 1 addition & 0 deletions ui/settings/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ android {

buildFeatures {
compose = true
buildConfig = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ internal fun SettingsHeader(
.padding(top = 24.dp)
.testTag("SETTINGS_HEADER_TITLE")
.fillMaxWidth(),
text = stringResource(id = R.string.app_name_full),
text = stringResource(id = photos.network.ui.common.R.string.app_name_full),
style = MaterialTheme.typography.headlineLarge,
textAlign = TextAlign.Center,
color = Color.White,
Expand Down

0 comments on commit c4f3350

Please sign in to comment.