This is minor but I just noticed that `javax` impo...
# android-studio
c
This is minor but I just noticed that
javax
imports are going in non-alphabetical order when I optimize imports in Android Studio. For example:
Copy code
import androidx.appcompat.app.AppCompatActivity
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import dagger.Lazy
import dagger.hilt.android.AndroidEntryPoint
import org.webrtc.EglBase
import tv.mydomain.example
import javax.inject.Inject
Is that expected?
AS version
Copy code
Android Studio Chipmunk | 2021.2.1
Build #AI-212.5712.43.2112.8512546, built on April 28, 2022
Runtime version: 11.0.12+0-b1504.28-7817840 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.4
GC: G1 Young Generation, G1 Old Generation
Memory: 3072M
Cores: 12
Registry: external.system.auto.import.disabled=true, ide.instant.shutdown=false
Non-Bundled Plugins: org.jetbrains.kotlin (212-1.6.21-release-334-AS5457.46)
e
AS defaults to
java.**
,
javax.**
,
kotlin.**
, and import aliases (
import ... as ...
) at the end. which I find quite unfortunate as it conflicts with https://developer.android.com/kotlin/style-guide#import_statements but that's how it is 🤷
m
The code style for both Java and Kotlin in preferences have an imports section. In that there are a list of the order of groups of imports.
c
Ok thanks for replying folks, appreciate it