Skip to content

Commit

Permalink
update to 5.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
picofaradpjf committed Apr 24, 2024
1 parent 6eaa5f4 commit 3d99ea0
Show file tree
Hide file tree
Showing 145 changed files with 7,572 additions and 4,232 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[*.{kt,kts}]
ktlint_standard_property-naming=disabled
17 changes: 17 additions & 0 deletions .github/workflows/ktlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: ktlint
on: [pull_request]
jobs:
ktlint:
name: Check Code Quality
runs-on: ubuntu-latest

steps:
- name: Clone repo
uses: actions/checkout@master
with:
fetch-depth: 1
- name: ktlint
uses: ScaCap/action-ktlint@master
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review # Change reporter
60 changes: 60 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "Build"

on:
pull_request:
push:
branches:
- master

jobs:
build:
name: Build
runs-on: macos-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set Up Java
uses: actions/setup-java@v3.12.0
with:
distribution: 'oracle'
java-version: '19.0.2'

- name: Set Up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.3'
channel: 'stable'

- name: Set up debug keystore
run: |
rm -f ~/.android/debug.keystore
keytool -genkeypair \
-alias androiddebugkey \
-keypass android \
-keystore ~/.android/debug.keystore \
-storepass android \
-dname 'CN=Android Debug,O=Android,C=US' \
-keyalg 'RSA' \
-keysize 2048 \
-validity 10000
- name: Quality checks monorepo
run: |
./bin/quality_checks.sh
- name: Build Android app & run native tests
run: |
#!/bin/bash -ex
cd example
flutter build apk --debug
cd android
./gradlew detekt
./gradlew testDebugUnitTest
- name: Build iOS app
run: |
find . -name "Podfile" -execdir pod install \;
cd example && flutter build ios --debug --no-codesign
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ Flutter.podspec
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

pubspec_overrides.yaml
.ruby-version
23 changes: 23 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
disabled_rules:
- cyclomatic_complexity
- identifier_name
- multiple_closures_with_trailing_closure
- nesting
- type_name
- unused_closure_parameter

excluded: # case-sensitive paths to ignore during linting. Takes precedence over `included`
- Pods
- "**/*.pb.swift" # exclude files with a wildcard

line_length: 300
type_body_length:
- 600

function_body_length:
- 150

file_length:
warning: 800

reporter: "xcode"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Setup melos to point to the dependencies in your local folder: `melos bootstrap`

### Android

Library requires kotlin version `1.5.31`.
Library requires kotlin version `1.8.21`.

### Update kotlin version

To update the kotlin version open Android studio and go to `Tools > Kotlin > Configure Kotlin plugin updates` and update `Update channel` to `1.5.x`.
To update the kotlin version open Android studio and go to `Tools > Kotlin > Configure Kotlin plugin updates` and update `Update channel` to `1.8.x`.

## Features

Expand Down
10 changes: 5 additions & 5 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
include: package:flutter_lints/flutter.yaml

analyzer:
strong-mode:
implicit-casts: false
implicit-dynamic: false
language:
# strict-casts: true -- DISABLED: was introduced in Dart 2.16
strict-inference: true
strict-raw-types: true
exclude:
- "bin/cache/**"
- "**/*.freezed.dart"
Expand All @@ -27,8 +28,7 @@ linter:
- empty_statements
- hash_and_equals
- invariant_booleans
- iterable_contains_unrelated_type
- list_remove_unrelated_type
- collection_methods_unrelated_type
- literal_only_boolean_expressions
- no_adjacent_strings_in_list
- no_duplicate_case_values
Expand Down
6 changes: 2 additions & 4 deletions bin/quality_checks.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash -ex
#workaround for codemagic CI since melos is not in bash
echo 'export PATH="$PATH":"$FLUTTER_ROOT/.pub-cache/bin"' >>~/.bashrc
echo 'export PATH="$PATH":"$FLUTTER_ROOT/bin"' >>~/.bashrc
source ~/.bashrc
export PATH="$PATH:$FLUTTER_ROOT/.pub-cache/bin"
export PATH="$PATH:$FLUTTER_ROOT/bin"

dart pub global activate melos 2.9.0

Expand Down
58 changes: 0 additions & 58 deletions codemagic.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions example/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks
12 changes: 7 additions & 5 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31
compileSdkVersion 33

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -48,7 +45,7 @@ android {
defaultConfig {
applicationId "com.signify.hue.reactivebleexample"
minSdkVersion 21
targetSdkVersion 31
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand All @@ -59,6 +56,11 @@ android {
signingConfig signingConfigs.debug
}
}
namespace 'com.signify.hue.reactivebleexample'

lint {
disable 'InvalidPackage'
}
}

flutter {
Expand Down
3 changes: 1 addition & 2 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.signify.hue.reactivebleexample">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<!-- required for API 18 - 30 -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.signify.hue.reactivebleexample


import androidx.annotation.NonNull
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant


class MainActivity: FlutterActivity(){
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine)
}
class MainActivity : FlutterActivity() {
override fun configureFlutterEngine(
@NonNull flutterEngine: FlutterEngine,
) {
GeneratedPluginRegistrant.registerWith(flutterEngine)
}
}
8 changes: 4 additions & 4 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.5.31'
ext.kotlin_version = '1.8.21'
repositories {
mavenCentral()
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.android.tools.build:gradle:8.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -25,6 +25,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
Loading

0 comments on commit 3d99ea0

Please sign in to comment.