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

Update libs #117

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[*.{kt,kts}]
disabled_rules = import-ordering, experimental:argument-list-wrapping, indent
insert_final_newline = true
# ij_kotlin_allow_trailing_comma = false
# ij_kotlin_allow_trailing_comma_on_call_site = false
# indent_size = unset
root = true

[*]
ktlint_standard_final-newline = disabled
ktlint_standard_no-consecutive-comments = disabled
ktlint_function_naming_ignore_when_annotated_with = Composable
35 changes: 9 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build & Test

on:
workflow_dispatch:
Expand All @@ -7,41 +7,24 @@ on:
jobs:

build:
name: 🔨 Build
name: 🔨 Build & Test
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v4

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

- name: Make gradle executable
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with gradle
run: ./gradlew build --stacktrace

# unit-tests:
# name: 🧪 Run Tests
# runs-on: ubuntu-latest
# steps:
#
# - name: Checkout code
# uses: actions/checkout@v2
#
# - name: Make gradle executable
# run: chmod +x ./gradlew
#
# - name: Execute unit tests
# run: ./gradlew test --stacktrace
#
# - name: Generate test report
# uses: actions/upload-artifact@v2
# with:
# name: unit_tests_report.html
# path: androidApp/build/reports/tests/testDebugUnitTest/
run: ./gradlew :shared:clean :shared:build --stacktrace

- name: Execute unit tests
run: ./gradlew :shared:allTests --stacktrace
31 changes: 6 additions & 25 deletions .github/workflows/deployAndroidDebug.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Android Debug
name: Build & Deploy Android Debug
on:
workflow_dispatch:
inputs:
Expand All @@ -16,42 +16,23 @@ env:
jobs:

build:
name: 🔨 Build
name: 🔨 Build & Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: "17"

- name: Make gradle executable
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
run: ./gradlew build --stacktrace

deploy:
name: 🚀 Deploy to Firebase App Distribution
needs:
- build
runs-on: ubuntu-latest
steps:

- name: Checkout Code
uses: actions/checkout@v4

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

- name: Make gradle executable
run: chmod +x ./gradlew
run: ./gradlew :shared:clean :shared:build --stacktrace

- name: Get local.properties from secrets
run: echo "${{secrets.LOCAL_PROPERTIES }}" > $GITHUB_WORKSPACE/local.properties
Expand Down
34 changes: 13 additions & 21 deletions appAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ android {

minSdk = 24
targetSdk = compileSdk
versionCode = if (System.getenv("VERSION_CODE").isNullOrEmpty()) {
1
} else {
System.getenv("VERSION_CODE").toInt()
}
versionName = if (System.getenv("VERSION_NAME").isNullOrEmpty()) {
"1.0.0"
} else {
System.getenv("VERSION_NAME")?.toString()
}
versionCode =
if (System.getenv("VERSION_CODE").isNullOrEmpty()) {
1
} else {
System.getenv("VERSION_CODE").toInt()
}
versionName =
if (System.getenv("VERSION_NAME").isNullOrEmpty()) {
"1.0.0"
} else {
System.getenv("VERSION_NAME")?.toString()
}

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -34,7 +36,7 @@ android {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}

Expand Down Expand Up @@ -78,14 +80,4 @@ dependencies {
implementation(libs.firebase.analytics)
implementation(libs.firebase.crashlytics)
implementation(libs.firebase.performance)

testImplementation(libs.jUnitKtx)
testImplementation(libs.kotlinX.coroutines.test)
testImplementation(libs.mockk)
testImplementation(libs.kotlin.test)
testImplementation(libs.archTestCore)
testImplementation(libs.robolectric)

androidTestImplementation(libs.test.rules)
androidTestImplementation(libs.test.runner)
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import org.koin.android.ext.koin.androidLogger
import org.koin.core.logger.Level

class NotflixApplication : Application() {

override fun onCreate() {
super.onCreate()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.vickbt.shared.ui.screens.main.MainScreen

@ExperimentalAnimationApi
class MainActivity : ComponentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ fun MainWindow(applicationScope: ApplicationScope) {
Window(
onCloseRequest = { applicationScope.exitApplication() },
title = "Notflix",
state = rememberWindowState(
position = WindowPosition.Aligned(Alignment.Center),
width = 1080.dp,
height = 800.dp,
)
state =
rememberWindowState(
position = WindowPosition.Aligned(Alignment.Center),
width = 1080.dp,
height = 800.dp,
),
) {
MainScreen()
}
Expand Down
13 changes: 1 addition & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ plugins {

alias(libs.plugins.ktLint)
alias(libs.plugins.detekt)
alias(libs.plugins.gradleVersionUpdates)
}

allprojects {
Expand Down Expand Up @@ -45,16 +44,6 @@ subprojects {
apply(plugin = "io.gitlab.arturbosch.detekt")
detekt {
parallel = true
config = files("${project.rootDir}/config/detekt/detekt.yml")
config.setFrom(files("${project.rootDir}/config/detekt/detekt.yml"))
}

tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
checkForGradleUpdate = true
outputDir = "build/dependencyUpdates"
reportfileName = "report"
}
}

tasks.register("clean").configure {
delete("build") // dependencyUpdates task, for example, writes here
}
Loading
Loading