Skip to content

Commit

Permalink
Updated to Kotlin 1.7 and Compose 1.2 (#14)
Browse files Browse the repository at this point in the history
* Updated to Kotlin 1.7 and Compose 1.2

* Disabled detekt formatting
  • Loading branch information
tomczyn committed Aug 11, 2022
1 parent b66cf0e commit 9e5fdb0
Show file tree
Hide file tree
Showing 12 changed files with 167 additions and 167 deletions.
1 change: 0 additions & 1 deletion .idea/gradle.xml

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

4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repositories {

dependencies {
compileOnly(gradleApi())
implementation("com.android.tools.build:gradle:7.1.3")
implementation(kotlin("gradle-plugin", "1.6.10"))
implementation("com.android.tools.build:gradle:7.2.2")
implementation(kotlin("gradle-plugin", "1.7.0"))
implementation("com.squareup:javapoet:1.13.0")
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/AndroidConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object AndroidConfig {
const val detekt = "io.gitlab.arturbosch.detekt"
}

const val sdkVersion = 31
const val sdkVersion = 33
const val minSdkVersion = 21
val javaVersion = JavaVersion.VERSION_11
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fun Project.kotlinCompileOptions() = tasks.withType<KotlinCompile>().configureEa
kotlinOptions {
jvmTarget = AndroidConfig.javaVersion.majorVersion
kotlinOptions.freeCompilerArgs = kotlinOptions.freeCompilerArgs + listOf(
"-Xopt-in=kotlin.RequiresOptIn"
"-opt-in=kotlin.RequiresOptIn"
)
}
}
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/java/Libs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ object Libs {
object AndroidX {
const val coreKtx = "androidx.core:core-ktx:${Versions.ktx}"
const val fragmentKtx = "androidx.fragment:fragment-ktx:${Versions.ktxFragment}"
const val vmKtx = "androidx.lifecycle:lifecycle-viewmodel-ktx:${Versions.ktxViewModel}"
const val vmKtx = "androidx.lifecycle:lifecycle-viewmodel-ktx:${Versions.ktxLifecycle}"
const val lifecycleRuntimeKtx =
"androidx.lifecycle:lifecycle-runtime-ktx:${Versions.ktxLifecycleRuntime}"
"androidx.lifecycle:lifecycle-runtime-ktx:${Versions.ktxLifecycle}"
const val appCompat = "androidx.appcompat:appcompat:${Versions.appCompat}"
const val navFragment = "androidx.navigation:navigation-fragment-ktx:${Versions.nav}"
const val navUi = "androidx.navigation:navigation-ui-ktx:${Versions.nav}"
Expand All @@ -34,7 +34,7 @@ object Libs {

const val activity = "androidx.activity:activity-compose:${Versions.composeActivity}"
const val viewModel =
"androidx.lifecycle:lifecycle-viewmodel-compose:${Versions.composeViewModel}"
"androidx.lifecycle:lifecycle-viewmodel-compose:${Versions.ktxLifecycle}"

object AndroidTest {
const val uiTest = "androidx.compose.ui:ui-test-junit4:${Versions.compose}"
Expand Down
39 changes: 19 additions & 20 deletions buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
object Versions {
const val kotlin = "1.6.10"
const val gradle = "7.1.3"
const val junit5Gradle = "1.8.2.0"
const val junit5 = "5.8.2"
const val kover = "0.5.0"
const val detekt = "1.19.0"
const val coroutines = "1.6.1"
const val ktx = "1.7.0"
const val ktxFragment = "1.4.1"
const val ktxViewModel = "2.4.1"
const val ktxLifecycleRuntime = "2.4.1"
const val kotlin = "1.7.0"
const val gradle = "7.2.2"
const val junit5Gradle = "1.8.2.1"
const val junit5 = "5.9.0"
const val kover = "0.5.1"
const val detekt = "1.21.0"
const val coroutines = "1.6.4"
const val ktx = "1.8.0"
const val ktxLifecycle = "2.5.1"
const val ktxFragment = "1.5.2"
const val androidXJunit = "1.1.3"
const val espresso = "3.4.0"
const val appCompat = "1.4.1"
const val material = "1.5.0"
const val ktlint = "10.2.1"
const val dagger = "2.41"
const val nav = "2.4.1"
const val compose = "1.1.1"
const val composeConstraint = "1.0.0"
const val composeActivity = "1.4.0"
const val composeViewModel = "2.4.1"
const val appCompat = "1.5.0"
const val material = "1.6.1"
const val ktlint = "10.3.0"
const val dagger = "2.43.2"
const val nav = "2.5.1"
const val composeCompiler = "1.2.0"
const val compose = "1.2.1"
const val composeConstraint = "1.0.1"
const val composeActivity = "1.5.1"
}
268 changes: 134 additions & 134 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,140 +275,140 @@ exceptions:
- 'RuntimeException'
- 'Throwable'

formatting:
active: true
android: false
autoCorrect: true
AnnotationOnSeparateLine:
active: false
autoCorrect: true
AnnotationSpacing:
active: false
autoCorrect: true
ArgumentListWrapping:
active: false
autoCorrect: true
indentSize: 4
maxLineLength: 120
ChainWrapping:
active: true
autoCorrect: true
CommentSpacing:
active: true
autoCorrect: true
EnumEntryNameCase:
active: false
autoCorrect: true
Filename:
active: true
FinalNewline:
active: true
autoCorrect: true
insertFinalNewLine: true
ImportOrdering:
active: true
autoCorrect: true
layout: '*,java.**,javax.**,kotlin.**,^'
Indentation:
active: true
autoCorrect: true
indentSize: 4
continuationIndentSize: 4
MaximumLineLength:
active: true
maxLineLength: 120
ignoreBackTickedIdentifier: false
ModifierOrdering:
active: true
autoCorrect: true
MultiLineIfElse:
active: false
autoCorrect: true
NoBlankLineBeforeRbrace:
active: true
autoCorrect: true
NoConsecutiveBlankLines:
active: true
autoCorrect: true
NoEmptyClassBody:
active: true
autoCorrect: true
NoEmptyFirstLineInMethodBlock:
active: false
autoCorrect: true
NoLineBreakAfterElse:
active: true
autoCorrect: true
NoLineBreakBeforeAssignment:
active: true
autoCorrect: true
NoMultipleSpaces:
active: true
autoCorrect: true
NoSemicolons:
active: true
autoCorrect: true
NoTrailingSpaces:
active: true
autoCorrect: true
NoUnitReturn:
active: true
autoCorrect: true
NoUnusedImports:
active: true
autoCorrect: true
NoWildcardImports:
active: true
PackageName:
active: false
autoCorrect: true
ParameterListWrapping:
active: true
autoCorrect: true
indentSize: 4
maxLineLength: 120
SpacingAroundAngleBrackets:
active: false
autoCorrect: true
SpacingAroundColon:
active: true
autoCorrect: true
SpacingAroundComma:
active: true
autoCorrect: true
SpacingAroundCurly:
active: true
autoCorrect: true
SpacingAroundDot:
active: true
autoCorrect: true
SpacingAroundDoubleColon:
active: false
autoCorrect: true
SpacingAroundKeyword:
active: true
autoCorrect: true
SpacingAroundOperators:
active: true
autoCorrect: true
SpacingAroundParens:
active: true
autoCorrect: true
SpacingAroundRangeOperator:
active: true
autoCorrect: true
SpacingAroundUnaryOperator:
active: false
autoCorrect: true
SpacingBetweenDeclarationsWithAnnotations:
active: false
autoCorrect: true
SpacingBetweenDeclarationsWithComments:
active: false
autoCorrect: true
StringTemplate:
active: true
autoCorrect: true
#formatting:
# active: true
# android: false
# autoCorrect: true
# AnnotationOnSeparateLine:
# active: false
# autoCorrect: true
# AnnotationSpacing:
# active: false
# autoCorrect: true
# ArgumentListWrapping:
# active: false
# autoCorrect: true
# indentSize: 4
# maxLineLength: 120
# ChainWrapping:
# active: true
# autoCorrect: true
# CommentSpacing:
# active: true
# autoCorrect: true
# EnumEntryNameCase:
# active: false
# autoCorrect: true
# Filename:
# active: true
# FinalNewline:
# active: true
# autoCorrect: true
# insertFinalNewLine: true
# ImportOrdering:
# active: true
# autoCorrect: true
# layout: '*,java.**,javax.**,kotlin.**,^'
# Indentation:
# active: true
# autoCorrect: true
# indentSize: 4
# continuationIndentSize: 4
# MaximumLineLength:
# active: true
# maxLineLength: 120
# ignoreBackTickedIdentifier: false
# ModifierOrdering:
# active: true
# autoCorrect: true
# MultiLineIfElse:
# active: false
# autoCorrect: true
# NoBlankLineBeforeRbrace:
# active: true
# autoCorrect: true
# NoConsecutiveBlankLines:
# active: true
# autoCorrect: true
# NoEmptyClassBody:
# active: true
# autoCorrect: true
# NoEmptyFirstLineInMethodBlock:
# active: false
# autoCorrect: true
# NoLineBreakAfterElse:
# active: true
# autoCorrect: true
# NoLineBreakBeforeAssignment:
# active: true
# autoCorrect: true
# NoMultipleSpaces:
# active: true
# autoCorrect: true
# NoSemicolons:
# active: true
# autoCorrect: true
# NoTrailingSpaces:
# active: true
# autoCorrect: true
# NoUnitReturn:
# active: true
# autoCorrect: true
# NoUnusedImports:
# active: true
# autoCorrect: true
# NoWildcardImports:
# active: true
# PackageName:
# active: false
# autoCorrect: true
# ParameterListWrapping:
# active: true
# autoCorrect: true
# indentSize: 4
# maxLineLength: 120
# SpacingAroundAngleBrackets:
# active: false
# autoCorrect: true
# SpacingAroundColon:
# active: true
# autoCorrect: true
# SpacingAroundComma:
# active: true
# autoCorrect: true
# SpacingAroundCurly:
# active: true
# autoCorrect: true
# SpacingAroundDot:
# active: true
# autoCorrect: true
# SpacingAroundDoubleColon:
# active: false
# autoCorrect: true
# SpacingAroundKeyword:
# active: true
# autoCorrect: true
# SpacingAroundOperators:
# active: true
# autoCorrect: true
# SpacingAroundParens:
# active: true
# autoCorrect: true
# SpacingAroundRangeOperator:
# active: true
# autoCorrect: true
# SpacingAroundUnaryOperator:
# active: false
# autoCorrect: true
# SpacingBetweenDeclarationsWithAnnotations:
# active: false
# autoCorrect: true
# SpacingBetweenDeclarationsWithComments:
# active: false
# autoCorrect: true
# StringTemplate:
# active: true
# autoCorrect: true

naming:
active: true
Expand Down
2 changes: 1 addition & 1 deletion ellipse-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publishEllipse("ellipse-core")

android {
buildFeatures.compose = true
composeOptions.kotlinCompilerExtensionVersion = Versions.compose
composeOptions.kotlinCompilerExtensionVersion = Versions.composeCompiler
}

dependencies {
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=false
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
kotlin.code.style=official

android.disableAutomaticComponentCreation=true
Loading

0 comments on commit 9e5fdb0

Please sign in to comment.