-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to AGP 4.2 and use the new transform API
- Loading branch information
Chao Zhang
committed
Jun 20, 2021
1 parent
7f9d080
commit 2bcf014
Showing
5 changed files
with
31 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/io/github/chao2zhang/LiveDataClassVisitorFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package io.github.chao2zhang | ||
|
||
import com.android.build.api.instrumentation.* | ||
import org.objectweb.asm.ClassVisitor | ||
|
||
@Suppress("UnstableApiUsage") | ||
abstract class LiveDataClassVisitorFactory : AsmClassVisitorFactory<InstrumentationParameters> { | ||
|
||
override fun createClassVisitor(classContext: ClassContext, nextClassVisitor: ClassVisitor) = | ||
LiveDataClassVisitor(nextClassVisitor) | ||
|
||
override fun isInstrumentable(classData: ClassData) = | ||
classData.className == "androidx.lifecycle.LiveData" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 0 additions & 104 deletions
104
src/main/kotlin/io/github/chao2zhang/LiveDataTransform.kt
This file was deleted.
Oops, something went wrong.