Skip to content

Commit

Permalink
[RNKC-044] - android lint (#26)
Browse files Browse the repository at this point in the history
* [RNKC-044] - android lint

* [RNKC-044] - suppress ViewConstructor warning

* [RNKC-044] - clean up workflow file
  • Loading branch information
kirillzyusko authored May 25, 2022
1 parent cf27eb0 commit 82bb1a5
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/verify-kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,20 @@ jobs:
with:
ktlint_version: 0.45.2
- run: ktlint "android/src/**/*.kt"
android-lint:
runs-on: ubuntu-latest
name: Android Lint
defaults:
run:
working-directory: ./android
steps:
- uses: actions/checkout@v2
- name: Setup JDK 11
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '11'
- name: Install dependencies
run: yarn install --frozen-lockfile --cwd ..
- name: Run Gradle Lint
run: ./gradlew lint
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ android {
}
}
lintOptions {
disable 'GradleCompatible'
warningsAsErrors true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
KeyboardController_kotlinVersion=1.3.50
KeyboardController_compileSdkVersion=29
KeyboardController_targetSdkVersion=29

android.useAndroidX=true
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.reactnativekeyboardcontroller

import android.annotation.SuppressLint
import androidx.core.view.WindowCompat
import com.facebook.react.uimanager.ThemedReactContext
import com.facebook.react.views.view.ReactViewGroup

@SuppressLint("ViewConstructor")
class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : ReactViewGroup(reactContext) {
override fun onAttachedToWindow() {
super.onAttachedToWindow()
Expand Down

0 comments on commit 82bb1a5

Please sign in to comment.