Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating to Kotlin ⚙️ #2

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d30ff0c
updated gradle versions, and added sample app to test library
jumaallan Oct 3, 2022
5d29425
setting up sample app
jumaallan Oct 3, 2022
def79b5
updated deps, and fixed build warnings
jumaallan Oct 3, 2022
febedf5
migrate to ktx, and added gradle plugins
jumaallan Oct 3, 2022
30e0c9c
migrate to versions plugin and cleaning up
jumaallan Oct 3, 2022
00b68b7
runt lint checks
jumaallan Oct 3, 2022
8c15305
added code analysis bash script
jumaallan Oct 3, 2022
a5a7b48
adding hilt and room support
jumaallan Oct 3, 2022
3a0d32e
setting up room database and database test
jumaallan Oct 3, 2022
15ca5bd
migrating from SQLite to Room Database
jumaallan Oct 3, 2022
58298b7
Rename .java to .kt
jumaallan Oct 5, 2022
2f2a436
breaking the api a bit
jumaallan Oct 5, 2022
4a9350b
setting up github workflows
jumaallan Oct 5, 2022
be3d207
setting up Fastlane
jumaallan Oct 5, 2022
e19f86b
setting up maven central publishing
jumaallan Oct 5, 2022
408291c
reworking multisim internals
jumaallan Oct 12, 2022
9a2dde1
re writting sim info
jumaallan Oct 12, 2022
00fecc6
fixed slotmanager class
jumaallan Oct 12, 2022
6e651a8
HSDKSims to SimInfo mapper
jumaallan Oct 12, 2022
fe99afe
migrate worker to kotlin
jumaallan Oct 12, 2022
99e1490
housekeeping - need to fix database
jumaallan Oct 12, 2022
17ad84b
moved database in data package
jumaallan Oct 18, 2022
00bf3a5
working on simworker
jumaallan Oct 18, 2022
6aa983d
migrated db schema path
jumaallan Oct 18, 2022
97750bc
added sim repo implementation
jumaallan Oct 18, 2022
c63a45f
some more refactors
jumaallan Oct 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@davkutalek @jumaallan

## code changes will send PR to following users
* @davkutalek @jumaallan
18 changes: 18 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Scope

_Please explain what your feature does in a short paragraph._ please check the below boxes
- [ ] I have followed the coding conventions
- [ ] I have added/updated necessary tests
- [ ] I have tested the changes added on a physical device
- [ ] I have run `./codeAnalysis.sh` to make sure all lint/formatting checks have been done.

## Closes/Fixes Issues
_Declare any issues by typing `fixes #1` or `closes #1` for example so that the automation can kick
in when this is merged_

## Other testing QA Notes
_What have you tested specifically and what possible impacts/areas there are that may need retesting
by others._

Please add a screenshot (if necessary)

30 changes: 30 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and test

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Bundle install
run: bundle install

- name: Static check
run: bundle exec fastlane staticCheck

- name: Unit tests
run: bundle exec fastlane unitTest

- name: Upload test report
uses: actions/upload-artifact@v3
if: failure()
with:
name: junit_test_report_${{ env.GITHUB_REF }}_${{ env.GITHUB_RUN_ID }}
path: multisim/build/reports/tests
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "fastlane"
218 changes: 218 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.5)
rexml
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.642.0)
aws-sdk-core (3.158.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.58.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.114.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.2)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
declarative (0.0.20)
digest-crc (0.6.4)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.93.0)
faraday (1.10.2)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.6)
fastlane (2.210.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (~> 2.0.0)
naturally (~> 2.2)
optparse (~> 0.1.1)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.29.0)
google-apis-core (>= 0.9.0, < 2.a)
google-apis-core (0.9.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.15.0)
google-apis-core (>= 0.9.0, < 2.a)
google-apis-playcustomapp_v1 (0.11.0)
google-apis-core (>= 0.9.0, < 2.a)
google-apis-storage_v1 (0.19.0)
google-apis-core (>= 0.9.0, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.0)
google-cloud-storage (1.43.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.19.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.2.0)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.5)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.1)
json (2.6.2)
jwt (2.5.0)
memoist (0.16.2)
mini_magick (4.11.0)
mini_mime (1.1.2)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.3.0)
naturally (2.2.1)
optparse (0.1.1)
os (1.1.4)
plist (3.6.0)
public_suffix (5.0.0)
rake (13.0.6)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.5)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.17.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.8)
CFPropertyList
naturally
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
webrick (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
arm64-darwin-21

DEPENDENCIES
fastlane

BUNDLED WITH
2.3.11
2 changes: 1 addition & 1 deletion app/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/build
/build
31 changes: 0 additions & 31 deletions app/build.gradle

This file was deleted.

83 changes: 83 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jlleitschuh.gradle.ktlint")
id("io.gitlab.arturbosch.detekt")
}

android {

namespace = "com.hover.app"

compileSdk = 33

defaultConfig {
applicationId = "com.hover.app"
minSdk = 21
targetSdk = 33
versionCode = 1
versionName = "1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = "11"
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}

buildFeatures {
compose = true
}

packagingOptions {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}

composeOptions {
kotlinCompilerExtensionVersion = "1.2.0"
}
}

dependencies {

implementation(project(":multisim"))

implementation(libs.android.coreKtx)
implementation(libs.android.appcompat)
implementation(libs.android.material)

implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.1")
implementation("androidx.activity:activity-compose:1.6.0")
implementation("androidx.compose.ui:ui:1.2.1")
implementation("androidx.compose.ui:ui-tooling-preview:1.2.1")
implementation("androidx.compose.material:material:1.2.1")

androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.2.1")
debugImplementation("androidx.compose.ui:ui-tooling:1.2.1")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.2.1")

androidTestImplementation(libs.test.android.junit)
androidTestImplementation(libs.test.android.espresso)

testImplementation(libs.test.junit4)
}
Loading