既存のプロジェクトでJetpack Composeを動かす方法について(2020/03/15時点)

モチベーションとしてはDroidKaigi App 2020でちょっと動かして見たかったんですが、そのうちすぐ状況が変わるとは思いますが、結構ハマるのでメモしています。
見た後に始めれば、ハマらずにすっと動かせるのではないかと思ったので、公開しています。

## Compose導入の現状の問題点と解決策

### Android Gradle Plugin(AGP) 4.1-alpha01でCrashlyticsが対応していない
Composeを使うにはAGPが4.1-alphaか4.0-alphaでないといけないです。
Composeというよりは、AGP 4.1-alpha01の問題で、CrashlyticsのGradle Pluginがまだ対応できていなくてビルドできないので、一旦外します。ここはAGPの問題なので、4.0のalphaなどを使えば一応通るはずです。
https://issuetracker.google.com/issues/150397894
変更ログ
https://github.com/DroidKaigi/conference-app-2020/commit/f3442dc7aecfa32f7938f012bb3be787246a82ef


### Annotation processorsと一緒に使えない問題
現状、aptと一緒に使えないという問題 ( https://issuetracker.google.com/issues/143232368 https://youtrack.jetbrains.com/issue/KT-34583 ) があるので、それに対応する必要があります。

* Composeを使うモジュールを分けて、そこではaptを使わずに実装していくアプローチ

tiviでは、ui-episodedetails-composeモジュールやcommon-ui-composeモジュールに分離しています。  
https://github.com/chrisbanes/tivi/pull/544

* aptを使えるようにしたpatchバージョンを使う

patchバージョンがあります。

https://developer.android.com/jetpack/androidx/releases/compose のページに書いてあるpatchバージョンです

```kotlin
dependencies {
    def compose_version = "0.1.0-dev06"

    kotlinPlugin "androidx.compose:compose-compiler:$compose_version"
    implementation "androidx.compose:compose-runtime:$compose_version"
}
composeOptions {
    // これがpatchあたったバージョン。
    kotlinCompilerVersion "1.3.61-dev-withExperimentalGoogleExtensions-20200129"
    kotlinCompilerExtensionVersion "0.1.0-dev06"
}
```

現状、フルで新しい機能を試していくにはモジュールを分けて行い、
妥協して作っていくならpatchバージョンと言う感じな気がします。(他にいい方法あれば教えて下さい)

## patchバージョンを使った場合の問題点

DroidKaigiではKlockというKotlin Multi Platformで使える日付のクラスが使えるライブラリを使っていますが、そのinline classでビルドエラーになりました。
このように問題が起こった場合は、モジュールを分けるのが現状良いかもしれません。
(patchの問題かもなので、普通にaptで動くようになってまだ再現するようだったら報告を考えています)

```
e: java.lang.IllegalStateException: Backend Internal error: Exception during code generation
Element is unknownThe root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.InlineClassAbi.mangledNameFor(InlineClassAbi.kt:72)
	at org.jetbrains.kotlin.codegen.CompilationErrorHandler.lambda$static$0(CompilationErrorHandler.java:35)
	at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:93)
	at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm$default(JvmBackendFacade.kt:64)
	at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:52)
	at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModule(JvmIrCodegenFactory.kt:36)
	at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.doGenerateFiles(KotlinCodegenFacade.java:47)
	at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:39)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:641)
...
Caused by: java.lang.IllegalStateException: Unhandled special name in mangledNameFor: <get-unixMillisLong>
	at org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.InlineClassAbi.mangledNameFor(InlineClassAbi.kt:72)
	at org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.MemoizedInlineClassReplacements.buildReplacement(MemoizedInlineClassReplacements.kt:197)
	at org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.MemoizedInlineClassReplacements.createStaticReplacement(MemoizedInlineClassReplacements.kt:172)
	at org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.MemoizedInlineClassReplacements.access$createStaticReplacement(MemoizedInlineClassReplacements.kt:41)
	at org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.MemoizedInlineClassReplacements$getReplacementFunction$1.invoke(MemoizedInlineClassReplacements.kt:55)
	at org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.MemoizedInlineClassReplacements$getReplacementFunction$1.invoke(MemoizedInlineClassReplacements.kt:41)
...   
    at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.downlevel(CompilerPhase.kt:24)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.runBody(CompilerPhase.kt:127)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.invoke(CompilerPhase.kt:105)
	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:42)
	at org.jetbrains.kotlin.backend.jvm.JvmLower.lower(JvmLower.kt:288)
	at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:91)
	... 37 more


e: java.lang.IllegalStateException: Backend Internal error: Exception during code generation

Execution failed for task ':feature:session:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork
   > Internal compiler error. See log for more details
```

## 諦めて、モジュールにComposeを切り出す
一応ビルド成功。
変更はこちらにあります。
https://github.com/DroidKaigi/conference-app-2020/compare/5ea4077..ae364d6
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/27388/ecc43820-13c7-3e78-5505-d031c60425ee.png)

# まとめ
Compose、まだまだ色々大変ですが、やっていきましょう :muscle: 

---
---
---

以下は調査ログです。

# 以下少しだけCompose導入で戦った記録  (prebuiltの取得の仕方とか、ローカルAndroidXデプロイの仕方などは参考になるかも)


```Dep.kt
    object Compose {
        val composeReleaseVersion = "dev06"
        val composeVersion = "0.1.0-$composeReleaseVersion"
        val composeCompilerExtensionVersion = "0.1.0-$composeReleaseVersion"
        val compose = "androidx.compose:compose-runtime:$composeVersion"
    }
```

```build.gradle
    buildFeatures {
        compose = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = Dep.Compose.composeCompilerExtensionVersion
    }
```

```build.gradle
dependencies {
...
    implementation(Dep.Compose.compose)
```

エラー。

```
e: java.lang.NoSuchMethodError: org.jetbrains.kotlin.codegen.state.GenerationState$Builder.isIrBackend(Z)Lorg/jetbrains/kotlin/codegen/state/GenerationState$Builder;
```

https://stackoverflow.com/a/59684701/4339442
Kotlinのバージョンがだめらしい。 :thinking: 

```Dep.kt
    object Kotlin {
        val version = "1.3.70"
        val stdlibCommon = "org.jetbrains.kotlin:kotlin-stdlib-common:$version"
        val stdlibJvm = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$version"
```

→ 同じエラー。

## Jetpack Composeの自力ビルド + ローカルパブリッシュ

リリースされていないバージョンを試してみる。
今snapshotビルドは動かなくなってしまったみたいなので、自分でビルドしてローカルにデプロイする。
最新のAndroidXのライブラリをローカルのmavenリポジトリにpublishして使う
https://qiita.com/takahirom/items/d0859c8ac125f026cd72

```
cd frameworks/support/ui # frameworks/supportでないので注意
./gradlew publishMavenPublicationToMavenLocal
```

deployされたことを確認。

```
ls ~/.m2/repository/androidx/compose/compose-runtime/                                                                                                                                        
compose-runtime/0.1.0-dev07/ compose-runtime/maven-metadata-local.xml
```

MavenLocalを追加

```build.gradle
    repositories {
        mavenLocal()
```

2度目のエラー。
DrawerLayoutの依存するinterfaceがないらしい。

```
e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
    class androidx.drawerlayout.widget.DrawerLayout, unresolved supertypes: androidx.customview.widget.Openable
```

MavenLocalの位置がよくなかったので、一番下に移動

```build.gradle
    repositories {
        ...
        mavenLocal()
    }
```

**振り出しに戻る**

```
e: java.lang.NoSuchMethodError: org.jetbrains.kotlin.codegen.state.GenerationState$Builder.isIrBackend(Z)Lorg/jetbrains/kotlin/codegen/state/GenerationState$Builder;
```

## AndroidXをKotlin 1.3.70で動かす

```./buildSrc/build_dependencies.gradle
if (isUiProject) {
    build_versions.kotlin = "1.3.70"
```

これだとprebuildに色々ないと言われて、ビルドできない。またmavenリポジトリを追加しまくってもmavenリポジトリにない謎のリポジトリがあってできなかった。

そこでこれでprebuiltの取得をやってみたら、prebuiltの取得に成功したが、一部リポジトリは成功しなかった。

```kotlin
cd frameworks/support
./development/importMaven/import_maven_artifacts.py --name=org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.70
```

以下のブランチをfetchすることで依存関係を取得できた

https://android-review.googlesource.com/c/platform/prebuilts/androidx/external/+/1230140

```
git fetch "https://android.googlesource.com/platform/prebuilts/androidx/external" refs/changes/40/1230140/3 && git checkout FETCH_HEAD
```

ビルドしたところ普通にコンパイルエラーめっちゃ出て心が折れました。

```
> Task :compose:compose-compiler-hosted:compileKotlin FAILED
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/ComposeIrGenerationExtension.kt: (34, 1): Class 'ComposeIrGenerationExtension' is not abstract and does not implement abstract member public abstract fun generate(moduleFragment: IrModuleFragment, pluginContext: IrPluginContext, backendContext: BackendContext?): Unit defined in org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/ComposeIrGenerationExtension.kt: (35, 5): 'generate' overrides nothing
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/ComposePlugin.kt: (47, 5): 'processOption' overrides nothing
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/AbstractComposeLowering.kt: (281, 44): Type mismatch: inferred type is JvmBackendContext but IrGeneratorContext was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/AbstractComposeLowering.kt: (292, 14): None of the following functions can be called with the arguments supplied:
public constructor IrFunctionReferenceImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, valueArgumentsCount: Int, origin: IrStatementOrigin? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrFunctionReferenceImpl
public constructor IrFunctionReferenceImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, origin: IrStatementOrigin? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrFunctionReferenceImpl
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposableCallTransformer.kt: (141, 38): Type mismatch: inferred type is JvmBackendContext but IrGeneratorContext was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposableCallTransformer.kt: (149, 38): Type mismatch: inferred type is JvmBackendContext but IrGeneratorContext was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposableCallTransformer.kt: (159, 41): Type mismatch: inferred type is JvmBackendContext but IrGeneratorContext was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposableCallTransformer.kt: (185, 45): Type mismatch: inferred type is JvmBackendContext but IrGeneratorContext was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposableTypeRemapper.kt: (146, 17): Type mismatch: inferred type is ClassConstructorDescriptor but Int was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposableTypeRemapper.kt: (149, 17): Type mismatch: inferred type is Int but IrStatementOrigin? was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposableTypeRemapper.kt: (150, 17): Too many arguments for public constructor IrConstructorCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrConstructorSymbol, typeArgumentsCount: Int, constructorTypeArgumentsCount: Int, valueArgumentsCount: Int, origin: IrStatementOrigin? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposableTypeRemapper.kt: (235, 16): None of the following functions can be called with the arguments supplied:
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, valueArgumentsCount: Int, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposableTypeRemapper.kt: (245, 13): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
private final fun IrMemberAccessExpression.copyRemappedTypeArgumentsFrom(other: IrMemberAccessExpression): Unit defined in androidx.compose.plugins.kotlin.compiler.lower.DeepCopyIrTreeWithSymbolsPreservingMetadata
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposeObservePatcher.kt: (185, 46): Type mismatch: inferred type is JvmBackendContext but IrGeneratorContext was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposeObservePatcher.kt: (268, 63): Type mismatch: inferred type is JvmBackendContext but IrGeneratorContext was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposeObservePatcher.kt: (292, 33): Unresolved reference: descriptor
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposeObservePatcher.kt: (344, 25): Type mismatch: inferred type is FunctionDescriptor but Int was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposeObservePatcher.kt: (438, 16): None of the following functions can be called with the arguments supplied:
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerLambdaMemoization.kt: (239, 40): Unresolved reference: descriptor
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerLambdaMemoization.kt: (352, 21): Unresolved reference: descriptor
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (25, 56): Unresolved reference: WrappedFunctionDescriptorWithContainerSource
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (26, 56): Unresolved reference: WrappedPropertyGetterDescriptor
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (27, 56): Unresolved reference: WrappedPropertySetterDescriptor
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (28, 56): Unresolved reference: WrappedSimpleFunctionDescriptor
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (247, 16): None of the following functions can be called with the arguments supplied:
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, valueArgumentsCount: Int, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (258, 13): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (261, 17): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (264, 13): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (265, 13): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (266, 13): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (268, 17): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (270, 13): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (366, 44): Type mismatch: inferred type is JvmBackendContext but IrGeneratorContext was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (383, 65): Unresolved reference: WrappedSimpleFunctionDescriptor
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (386, 17): Unresolved reference: WrappedPropertyGetterDescriptor
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (391, 17): Unresolved reference: WrappedPropertySetterDescriptor
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (396, 17): Unresolved reference: WrappedFunctionDescriptorWithContainerSource
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (398, 17): Unresolved reference: WrappedSimpleFunctionDescriptor
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (410, 16): None of the following functions can be called with the arguments supplied:
public constructor IrFunctionImpl(startOffset: Int, endOffset: Int, origin: IrDeclarationOrigin, descriptor: FunctionDescriptor, returnType: IrType) defined in org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl
public constructor IrFunctionImpl(startOffset: Int, endOffset: Int, origin: IrDeclarationOrigin, symbol: IrSimpleFunctionSymbol, returnType: IrType, visibility: Visibility = ..., modality: Modality = ...) defined in org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl
public constructor IrFunctionImpl(startOffset: Int, endOffset: Int, origin: IrDeclarationOrigin, symbol: IrSimpleFunctionSymbol, name: Name, visibility: Visibility, modality: Modality, returnType: IrType, isInline: Boolean, isExternal: Boolean, isTailrec: Boolean, isSuspend: Boolean, isOperator: Boolean, isExpect: Boolean, isFakeOverride: Boolean) defined in org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (423, 18): Cannot infer a type for this parameter. Please specify it explicitly.
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (468, 13): Type mismatch: inferred type is ClassConstructorDescriptor but Int was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/compiler/lower/ComposerParamTransformer.kt: (469, 19): The integer literal does not conform to the expected type IrStatementOrigin?
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (440, 21): Unresolved reference: putValueArgument
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (492, 49): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (499, 49): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (536, 41): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (539, 41): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (574, 17): Unresolved reference: putValueArgument
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (583, 9): None of the following functions can be called with the arguments supplied:
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, valueArgumentsCount: Int, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (591, 9): Unresolved reference: dispatchReceiver
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (700, 41): Type mismatch: inferred type is JvmBackendContext but IrGeneratorContext was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (749, 41): Type mismatch: inferred type is JvmBackendContext but IrGeneratorContext was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (824, 41): Type mismatch: inferred type is JvmBackendContext but IrGeneratorContext was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (836, 9): None of the following functions can be called with the arguments supplied:
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (842, 9): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (843, 9): Unresolved reference: it
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (859, 9): None of the following functions can be called with the arguments supplied:
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, valueArgumentsCount: Int, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, typeArgumentsCount: Int, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
public constructor IrCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrFunctionSymbol, origin: IrStatementOrigin? = ..., superQualifierSymbol: IrClassSymbol? = ...) defined in org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (878, 13): Type mismatch: inferred type is ClassConstructorDescriptor but Int was expected
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (879, 13): An argument is already passed for this parameter
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (901, 5): None of the following functions can be called with the arguments supplied:
public constructor IrDelegatingConstructorCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrConstructorSymbol) defined in org.jetbrains.kotlin.ir.expressions.impl.IrDelegatingConstructorCallImpl
public constructor IrDelegatingConstructorCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrConstructorSymbol, typeArgumentsCount: Int) defined in org.jetbrains.kotlin.ir.expressions.impl.IrDelegatingConstructorCallImpl
public constructor IrDelegatingConstructorCallImpl(startOffset: Int, endOffset: Int, type: IrType, symbol: IrConstructorSymbol, typeArgumentsCount: Int, valueArgumentsCount: Int) defined in org.jetbrains.kotlin.ir.expressions.impl.IrDelegatingConstructorCallImpl
e: /Users/takahirom/git/aosp-androidx/frameworks/support/compose/compose-compiler-hosted/src/main/java/androidx/compose/plugins/kotlin/frames/FrameIrTransformer.kt: (988, 1): Class 'FrameRecordClassDescriptor' is not abstract and does not implement abstract member public abstract fun getDefaultFunctionTypeForSamInterface(): SimpleType? defined in org.jetbrains.kotlin.descriptors.ClassDescriptor

FAILURE: Build failed with an exception.


```


</details>