컬러는 HSB(Hue, Saturation, Brightness) 색상, 채도, 명도 다루기 용이

2가지가 같으면 가까운 색감이고 어울림 / 명도 채도가 같으면 톤이 같다


adobe color http://color.adobe.com/ko/create/color-wheel/

https://material.io/design/layout/spacing-methods.html#


근접 정렬 반복 대비


폰트 Roboto(스마트 디바이스 고려 영문) 

Noto(구글 어도비 다국어 지원 Roboto와 조합사용)


폰트 패밀리 Typeface.DEFAULT DEFAULT_BOLD MONOSPACE SANS_SERIF SERIF

폰트 스타일 Typeface.NORMAL BOLD ITALIC BOLD_ITALIC 한국어 italic 최소사용


그리드 레이아웃 여백을 8의 배수로 dp 설계하면 다화면 대응 용이


디자인 경쟁자 분석 proscons 리스트 기능별 장단점 정리 표


고객평가 린캔버스:고객의 문제/문제의 해결책/측정 가능한 지표/고유의 가치 제안/

경쟁우위/인지.배포 경로/타깃이 될 고객 목표/초기 고객군/비용 구조/수익원


프로토타이핑

1.페이퍼 프로토타이핑/스케치, 

2.디자인 목:Prott(prottapp.com)/POP/Flinto/InVision, 

3.데모(실제 앱)

블로그 이미지

dev김

안드로이드 개발자로 만 4년이 좀 안되게 근무했었고 그 이상의 공백을 가지고 있다. 다시 현업에 복귀하기 위한 노력의 흔적을 담으려고 한다.

,
CI 지속적 통합
빌드 -> 테스트 -> 인스펙션 -> 디플로이 -> 피드백 -> 커밋, 정기,릴리즈 빌드
Circle CI 가벼워 도입장벽이 낮고 Saas 환경에서(유사 travis CI, Codeship)
Jenkins 프로젝트 설정 모두 가능 서버 운영 환경 정비

리눅스에 젠킨스 설치
서버 확인
$uname -a 
자바 설치
$sudo apt-get install openjdk-7-jre 
$sudo apt-get install openjdk-7-jdk
$java -version
$javac -version
젠킨스 설치
$wget -q -0 - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
$sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources. list.d/jenkins.list
$sudo apt-get update
$sudo apt-get install jenkins
http://localhost:8080에 접속해서 확인
sudo cat /var/lib/jenkins/secrets/initialAdminPassword 패스워드 복사후 잠금해제

install suggested plugins
계정 생성하고 필요한 권한 설정

안드로이드 환경 구축
젠킨스 사용자로 변경
$sudo su jenkins
$cd ~
안드로이드 sdk 다운로드
$wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
$tar -xvf android-sdk_r24.4.1-linux.tgz
$rm android-sdk_r24.4.1-linux.tgz
필요한 패키지 설치
$android-sdk-linux/tools/android update sdk --no-ui --all --filter "platform-tools"
$android-sdk-linux/tools/android update sdk --no-ui --all --filter "tools"
$android-sdk-linux/tools/android update sdk --no-ui --all --filter "android-23"
$android-sdk-linux/tools/android update sdk --no-ui --all --filter "extra-android-m2repository"
$android-sdk-linux/tools/android update sdk --no-ui --all --filter "sys-img-x86_64-android-23"
빌드 자동화
디버그
git으로 프로젝트 클론 git plugin github plugin 설치
https://localhost:8080/pluginManager/available 플러그인 관리 페이지
깃허브에서 프로젝트 클론(소스코드 관리 -> git -> repository url 지정)
build에서 execute shell 실행 스크립트 입력란에 ./gradlew assembleDebug 입력
결과물 저장 기능으로 다운로드 할 수 있게 한다
Android sdk 경로 Jenkins 관리->시스템 속성->Global properties에서 환경변수 설정
설정 마치고 build now

깃허브 빌드하기
지정한 시간마다 작업 설정 항목 중 빌드 유발에서 Poll SCM 설정
깃허브의 푸시를 트리거로 깃허브 쪽에서 Webhooks 설정에서 Jenkins URL 지정
플러그인O : Jenkins 빌드 유발에서 Github hook trigger for GitScm polling 에 체크
플러그인X : 포스트되는 데이터를 직접 처리해서 빌드

릴리스 빌드 자동
./gradlew assembleRelease
app/sample.keystore
app/signingconfig.properties
storePassword=password
keyAlias=sample
keyPassword=password
릴리즈용 설정
signingConfigs{ release { 
def configFile = file("signingconfig.properties")
def props = new Properties()
props.load(new FileInputStream(configFile))

storeFile file("sample.keystore")
storePassword props.storePassword
keyAlias props.keyAlias
keyPassword props.keyPassword } }
buildTypes{ release{ signingConfig signingConfigs.release } }
암호화된 서명 파일 준비
공개키 만들기
$openssl rand 32 -out key -base64
$cat key
암호화
$openssl enc -e -aes128 -kfile key -in app/signingconfig.properties -out app/signingconfig.properties.aes128
$openssl enc -e -aes128 -kfile key -in app/sample.keystore -out app/sample.keystore.aes128
커밋
$git add app/signingconfig.properties.ae128 app/sample.keystore.aes128
$git commit -m "add signing secure files."
복호화 execute shell
$echo "공개키" > key
$openssl enc -d -aes128 -kfile key -in app/signingconfig.properties.aes128 -out app/signingconfig.properties
$openssl enc -d -aes128 -kfile key -in app/sample.keystore.aes128 -out app/sample.keystore
테스트 자동화 execute shell
./gradlew clean test

코드 커버리지 시각화 플러그인(Jacoco Cobertura)

android emulator plugin 설치 후
빌드환경 설정
run an android emulator during build
run emulator with properties

인스펙션 자동화
android lint (그레이들 이용하면 설정없이 그대로 실행가능 ./gradlew lint
https://wiki.jenkins.io/display/jenkins/android+lint+plugin

findbugs ./gradlew lint findbugs 설정(app/build.gradle)
apply plugin: 'findbugs'
task findbugs(type:FindBugs, dependsOn:assembleDebug)
{ ignoreFailures = true
effort="max"
reportLevel = "medium"
excludeFilter = new File("config/findbugs/filter.xml")
classes = files("build/intermediates/classes/")
source 'src/main'
include '**/*.java'
reports{
xml.enabled = true
html.enabled = false }
classpath=files() }
분석대상제외 지정 filter.xml










그밖의 코드분석도구 Checkstyle PMD

디플로이 자동화
DeployGate 디버그 빌드 deploygate.com

DeployGate 설정(app/build.gradle)
deploygate
{ username="USER_NAME" token="TOKEN"
apks{ release{ sourceFile= file("[release apk file path]") }
debug{ sourceFile= file("[debug apk file path]") } } }
./gradlew uploadDeployGate

구글 플레이 개발자 API
developers.google.com/android-publisher/ 를 이용해 자동화가능

Circle CI
circleci.com
커밋할때마다 빌드 release 브랜치는 릴리즈 빌드 나머지는 디버그
테스트 실행 결과 파일 저장
코드 분석 결과 파일 저장
DeployGate에 Apk업로드

Circle CI 설정(circle.yml)

빌드환경설정
dependencies:
pre:
- echo y | android update sdk --no-ui --all --filter 
"android-23,build-tools-23.0.3,extra-android-m2repository,extra-android-support"
실행할 커맨드 설정
test:
override:
-if ["$CIRCLE_BRANCH" = "release" ]; then
./gradlew assembleRelease;
else
./gradlew assembleDebug;
fi
- ./gradlew lint; cp -r app/build/outputs $CIRCLE_ARTIFACTS
- ./gradlew findbugs; cp -r app/build/reports $CIRCLE_ARTIFACTS
apk가 생기면 마지막으로 DeployGate에 업로드
deployment:
test:
branch: /*/
commands:
- ./gradlew uploadDeployGate
블로그 이미지

dev김

안드로이드 개발자로 만 4년이 좀 안되게 근무했었고 그 이상의 공백을 가지고 있다. 다시 현업에 복귀하기 위한 노력의 흔적을 담으려고 한다.

,

테스트

unit test Junit 

https://github.com/junit-team/junit/wiki/Getting-started


ui 테스트 개발중인 앱
Robolectric https://robolectric.org 안드로이드 sdk 에뮬레이트해서 테스트 진행
https://codelabs.developers.google.com/codelabs/android-testing/index.html?index=..%2F..index#6

Mockito https://mockito.org

onView(withId(editId)).perform(typeText("text"));
onView(withId(btnId)).perform(perform(click());
onView(withText("text")).check(matches(isDisplayed());

@Rule public ActivityTestRule<MainActivity> mMainActivityTestRule =
new ActivityTestRule<>(MainActivity.class);

@Test
onView(withText("message")).check(doesNotExist());
@Test
onView(withId(fabId)).perform(click());
onView(withText("message")).check(matches(isDisplayed());

UI테스트 에스프레소 gradlew connectedAndroidTest

androidTestImplementation('com.android.support.test:runner:0.4')
{ exclude module: 'support-annotations' }
androidTestImplementation('com.android.support.test:rules:0.4')
{ exclude module: 'support-annotations' }
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.1')
{ exclude module: 'support-annotations' }

exclude moduel 라이브러리 중복으로 인해 충돌시 설정


에스프레소 치트 시트 

https://developer.android.com/training/testing/espresso/cheat-sheet

https://github.com/googlesamples/android-topeka/tree/java


Espresso.onView / Espresso.onData / Intents.intended /  Intents.intending


UIautomator 다른 앱과의 연계 홈 화면에서의 동작 테스트

exclude 제외하고 러너와 룰러도 사용

androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'

https://developer.android.com/training/testing/ui-automator#java

$ANDROID_HOME/tools/uiautomatorviewer


단위 테스트는 가능한한 모두 UI테스트는 중요 화면과 기능으로 범위를 좁혀 작성

블로그 이미지

dev김

안드로이드 개발자로 만 4년이 좀 안되게 근무했었고 그 이상의 공백을 가지고 있다. 다시 현업에 복귀하기 위한 노력의 흔적을 담으려고 한다.

,