Parcelable: Use innerClassNameFactory to figure out the internal name of the Creator class (KT-19680)
KAPT3 class builder mode in 1.1.4 replaces '$' (inner class name separators) with '/' by providing special innerClassNameFactory. We should use it to be compatible with kapt.
This commit is contained in:
committed by
Yan Zhulanow
parent
84e59601c1
commit
c330285fd0
+4
@@ -50,4 +50,8 @@ dependencies {
|
||||
|
||||
kapt {
|
||||
generateStubs = true
|
||||
}
|
||||
|
||||
androidExtensions {
|
||||
experimental = true
|
||||
}
|
||||
+14
@@ -15,11 +15,15 @@
|
||||
*/
|
||||
package com.example.dagger.kotlin.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.location.LocationManager
|
||||
import android.os.Bundle
|
||||
import android.os.Parcelable
|
||||
import com.example.dagger.kotlin.DemoActivity
|
||||
import com.example.dagger.kotlin.DemoApplication
|
||||
import com.example.dagger.kotlin.R
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
import kotlinx.android.synthetic.main.activity_main.locationInfo
|
||||
import javax.inject.Inject
|
||||
|
||||
@@ -36,3 +40,13 @@ class HomeActivity : DemoActivity() {
|
||||
locationInfo.text = "Injected LocationManager:\n$locationManager"
|
||||
}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
@Inject
|
||||
lateinit var c: Context
|
||||
|
||||
private lateinit var bars: List<Bar>
|
||||
|
||||
@Parcelize
|
||||
data class Bar(val intent: Intent): Parcelable
|
||||
}
|
||||
Reference in New Issue
Block a user