Skip to content

import is uncorrect when enable keep annotation #451

@stars-one

Description

@stars-one

when I enable the keep annotaion in plugin advanced config,the code has a mistake ,follow is output bean code:

import androidx.annotation.Keep

im@Keep
data class AudioResp(
    val category: String = "", // branding
    val content_type: String = "", // audio
    val created_at: String = "", // 2025-06-16T07:08:44.795000
    val created_by: Int = 0, // 4
    val file_type: String = "", // audio/mpeg
    val id: String = "", // 48203c31-6807-4651-8c62-36c14005c370
    val name: String = "", // test_key2
    val s3_key: String = "", // web-content/audio/48203c31-6807-4651-8c62-36c14005c370_test_key2
    val temp_url: String = "", // https://redteatest.s3.amazonaws.com/web-content/audio/48203c31-6807-4651-8c62-36c14005c370_test_key2?AWSAccessKeyId=AKIASV5YVYTEMRUXQBOE&Signature=%2F47O%2FOcI7fww1ODX9LbO6T2wils%3D&Expires=1750060855
    val type: String = "", // music
    val updated_at: String = "" // 2025-06-16T07:08:44.795000
)port androidx.annotation.Keep

Here is my env:

  • plugin version is 3.7.7
  • Android Studio :
Android Studio Meerkat Feature Drop | 2024.3.2
Build #AI-243.25659.59.2432.13423653, built on April 30, 2025
Runtime version: 21.0.6+-13368085-b895.109 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
Kotlin plugin: K2 mode
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4096M
Cores: 16
Registry:
  ide.instant.shutdown=false
Non-Bundled Plugins:
  com.intellij.classic.ui (243.21565.122)
  com.intellij.marketplace (243.25659.59)
  com.github.lppedd.idea-conventional-commit (0.24.1)
  wu.seal.tool.jsontokotlin (3.7.7)
  indent-rainbow.indent-rainbow (2.2.0)
  izhangzhihao.rainbow.brackets.lite (1.2.0)
  com.github.heftekharm.vectorizesvgfromclipboard (1.0.2)
  com.suusan2go.kotlin-fill-class (2.0.1)
  com.godwin.kdocer (1.6)
  com.mallowigi (101.2.0)
  zielu.gittoolbox (600.1.2+243)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions