본문 바로가기

android11

Migrating build.gradle from Groovy to Kotlin guides.gradle.org/migrating-build-logic-from-groovy-to-kotlin/ Migrating build logic from Groovy to Kotlin Declaring dependencies in existing configurations is similar to the way it’s done in Groovy build scripts, as you can see in this example: build.gradle plugins { id 'java' } dependencies { implementation 'com.example:lib:1.1' runtimeOnly 'com.example:run guides.gradle.org Groovy DSL gradle .. 2020. 9. 25.
Android Networking with coroutines Flow 들어가기전에 Flow 문서를 보고 정리한 포스팅이며 1, 3, 4번은 필수로 학습이 필요하다. -> Flow #1 : Flow builders, operators, context -> Flow #2 : Buffering -> Flow #3 : Composing and flattening flows -> Flow #4 : Exceptions, completions, cancellation 요즘 구글 가이드라인으로 coroutines 이 필수적으로 등장하고 있어서 기존에 서버 API 통신을 위해 사용하던 Rx 를 coroutines Flow 를 사용하는 패턴으로 변경해보려 한다. 기본 구조 MVVM 구조와 서버 API 통신을 위해 Retrofit2 의 조합을 전제로 해본다. 크게 App module 과 서버.. 2020. 8. 6.
Android Lint #2 - Custom Lint 본인 프로젝트에 맞는 Lint 구성을 직접 코딩해서 만들 수 있다! 우선 새로운 프로젝트 또는 기존 프로젝트의 모듈로 Custom lint 를 만들어보자. (참고로 module 명은 lint 로 설정함) 1. lint module 의 build.gradle 구성 dependency 에 com.android.tools.lint 에서 제공하는 lint-api, lint-checks 를 추가한다. compile 시에만 참고할 수 있도록 compileOnly 로 추가해주었다. dependencies { compileOnly "com.android.tools.lint:lint-api:$lint_version" compileOnly "com.android.tools.lint:lint-checks:$lint_vers.. 2020. 7. 3.
Android Lint #1 - 기본 1. Android Lint 란 무엇인가? Android Studio 에서 제공하는 Lint 라는 코드 스캔 도구 앱 실행 또는 테스트 케이스 작성 없이 코드의 구조적 품질 문제를 감지하고 수정 가능 감지된 문제들은 설명과 함께 심각도 레벨이 함께 보고되므로 우선순위를 정할 수 있다 프로젝트와 관련 없는 문제의 심각도 레벨 조정하여 특정 문제에 대해 강조 표시할 수 있다 기본적으로 Android Studio 에서 앱 빌드 시, 기본 Lint 및 IDE 검사가 실행된다 수동으로 검사 또는 Command line 으로 실행할 수도 있다 App source files : Java, Kotlin, XML, Proguard 구성 파일 및 icon 파일을 포함한 Android 프로젝트를 구성하는 파일로 이루어진다... 2020. 7. 2.
App Startup time 사용자는 앱이 빠르게 로드되길 바라는데 시작 시간이 느리면 구글 플레이 스토어에서 낮은 점수를 받을 수도 있고,, 앱을 아예 사용안할 수도 있으니 앱 시작 시간을 최적화하는데 도움을 주겠다는 내용이다. 1. Understand app-start internals 앱은 Cold start, Warm start, Hot start 라는 3가지 상태 중에서 시작한다 위의 각 상태는 사용자에게 앱이 로드되는데 걸리는 시간에 영향을 준다 Cold start 는 앱이 처음부터 시작, 이 외는 실행중인 앱을 background -> foreground 로 가져와서 시작 그러니 항상 Cold start 를 기준으로 최적화를 해보자! 그럼 자연히 다른 시작 상태의 성능도 개선될 것이다! 2. Cold start 앱이 처.. 2020. 6. 25.
App Startup https://developer.android.com/topic/libraries/app-startup?authuser=1 App Startup | Android 개발자 | Android Developers The App Startup library provides a straightforward, performant way to initialize components at application startup. Both library developers and app developers can use App Startup to streamline startup sequences and explicitly set the order of initializatio developer.android.com App.. 2020. 6. 25.