-
Notifications
You must be signed in to change notification settings - Fork 6
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
Kotlin 빌드 가능하게 추가, data package kotlin 으로 치환 #3
base: master
Are you sure you want to change the base?
Conversation
kotlin 빌드와 관련된 gradle 파일 수정 data package 수정
오 고수님 코드 잘봤습니다 |
@chonamdoo 에이 고수라뇨 ㅋㅋㅋ 거의 변환 수준인데요 뭐 ㅜㅜ |
@Insert(onConflict = OnConflictStrategy.REPLACE) | ||
abstract fun saveMovies(movieEntities: Array<MovieEntity>) | ||
// fun saveMovies(vararg movieEntities: MovieEntity) | ||
// abstract fun saveMovies(movieEntities: Lit<MovieEntity>) // can not compile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 동일하게 에러가나서 찾아보고있는 중인데,
앱 클리어하고 나서 될떄가 있고, 안될때가 있고... 왔다갔다 하네요
- fix aac version 1.0.0-alpha1 to 1.0.0-alpha5 - fix MovieDao.saveMovies parameter array to list (https://issuetracker.google.com/issues/62259820)
@Pluu aac version alpha3 에서 해결된 이슈였네요. |
- avoid access abstract method on init.
} | ||
|
||
@get:Synchronized | ||
val asLiveData: LiveData<Resource<ResultType>> by lazy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
init 구문에서 abstract 메소드에 접근하면 안되서 회피로직을 적용해봤어요.
관련 워닝
abstract class Base {
val code = calculate()
abstract fun calculate(): Int
}
class Derived(private val x: Int) : Base() {
override fun calculate() = x
}
@Test
fun testIt() {
println(Derived(42).code) // Expected: 42, actual: 0
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 되버리면 처음 호출될때의 값으로 정해져서 원하던 결과가 안나오지 않을까요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@get:Synchronized
라는건 처음봤네요 +ㅁ+
@@ -46,19 +52,25 @@ dependencies { | |||
|
|||
compile rootProject.ext.roomRuntime | |||
annotationProcessor rootProject.ext.roomCompiler | |||
kapt rootProject.ext.roomCompiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
memo: 같이 적어주지 않으면 room 사용 시 오류나므로 추가
kotlin 빌드와 관련된 gradle 파일 수정
data package 수정