Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android Studioプラグインを作ってみよう 〜Compose for Desktop...

k-tomoyasu
October 26, 2023

Android Studioプラグインを作ってみよう 〜Compose for Desktopで始めるプラグイン開発〜

2023年10月26日(木)開催のpixiv App Nightで発表した資料です。

k-tomoyasu

October 26, 2023
Tweet

More Decks by k-tomoyasu

Other Decks in Programming

Transcript

  1. Android StudioϓϥάΠϯΛ࡞Γ͍ͨ • Android Studio͸IntelliJϕʔεͷIDE • جຊతʹ͸IntelliJϓϥάΠϯ • ଟ͘ͷIntelliJϓϥάΠϯ͸Android StudioͰͦͷ··࢖͑Δ

    • IntelliJϓϥάΠϯ։ൃͷυΩϡϝϯτΛΈͯਐΊΔ 
 https://plugins.jetbrains.com/docs/intellij/developing-plugins.html • ͍͔ͭ͘Android Studio޲͚ͷઃఆ͕͋Δ • Android Studioʹґଘͨ͠ػೳ͕ͳ͚Ε͹ෆཁ
  2. ։ൃ؀ڥ • ݴޠ: Kotlin | 1.9.10 • ։ൃ: IntelliJ IDEA

    (Community Edition) | IC-232.10072.27 • ಈ࡞֬ೝ: Android Studio Giraffe | 2022.3.1 Patch 2 • ϓϥάΠϯ͕Android Studioʹͳ͍ػೳʹґଘͯ͠͠·͍ͬͯͯ΋։ ൃதʹؾ෇͚Δ(σϑΥϧτͩͱಈ࡞֬ೝ࣌ʹ͸։ൃͰ࢖͍ͬͯΔIDE ͕ىಈ͞ΕΔ)
  3. ϓϩδΣΫτ࡞੒ • File > New > Project ͔ΒIDE PluginΛબ୒ •

    ࡞੒ͨ͠εέϧτϯϓϩδΣΫτʹAndroid Studio޲͚ͷઃఆΛՃ͑Δ
  4. version.setͱAndroid Studioͷޓ׵ੑ • ࢦఆ͢ΔIntelliJ IDEAͷόʔδϣϯ͸λʔήοτͱͳΔAndroid Studioͱޓ׵ੑ͕͋Δ΋ͷʹ͢Δ • ઌ΄Ͳͷྫͷ version.set(“2022.3.3”) ͷ෦෼

    • IntelliJ IDEAͱAndroid StudioͷόʔδϣϯͷରԠΛ·ͱΊͨϖʔδ͕͋Δ • ࢦఆͨ͠IDEAͷόʔδϣϯ͕Android StudioͷͲͷόʔδϣϯͱޓ׵ੑ͕͋Δ͔֬ೝͯ͠ɺόʔδϣ ϯΛ߹ΘͤΔ
  5. Compose for Desktop • Compose MultiplatformͷҰ෦ • Jetpack Compose ͷ

    API Λ༷ʑͳϓϥοτϑΥʔϜʹద༻ • Swingͱ૬ޓӡ༻͢ΔͨΊͷAPI͕͋Γɺ૊Έ߹Θͤͯ࢖͑Δ • ϓϥάΠϯͷUI࣮૷ʹར༻Ͱ͖Δ • SwingΛ࢖Θͳ͘ͳΔΘ͚Ͱ͸ͳ͍ • Composeͱͷ઀͗໨͸΋ͪΖΜɺSwingͷ࣮૷Λ࢖͍͍ͨ৔໘΋͋Δ
  6. Compose for DesktopͰͷϓϥάΠϯ։ൃͷॴײ • ؾʹͳͬͨ఺ • ϓϥάΠϯͷϑΝΠϧαΠζ͕େ͖͘ͳΔ • Swingʹ͸ރΕٕͨज़ͷ҆৺ײ͕͋Δ •

    Compose for DesktopͰ͸ෆ۩߹Β͖͠΋ͷΛ౿ΜͩΓɺະ࣮૷ͷ΋ͷ͕͋ͬͨΓ • Swingͱͷ૬ޓӡ༻͕ࠓޙ΋ൃల͍͔ͯ͘͠Ͳ͏͔ • ྑ͍఺ • ಈతʹมԽ͢Δཁૉ͕ଟ͍UIͷ࣮૷ʹڧ͍ • Composeͷ஌ࣝΛ࢖͑Δ • ϨΠΞ΢τͷํ๏΍ඪ४తͳίϯϙʔωϯτͷ࢖͍ํ͕෼͔ΔϝϦοτ͸େ͖͍ • ָ͍͠
  7. ࢀߟ • IntelliJ Platform SDK (ެࣜυΩϡϝϯτ) • Android Studio Plugin

    
 • JetBrains/compose-multiplatofrm ϦϙδτϦ (pluginͷαϯϓϧ) 
 • JetBrains/android (Android Studio࣮૷) 
 • pbreqult/adb-idea 
 • AndroidͰϥΠτ/μʔΫϞʔυͷεΫγϣΛshellΛୟ͚͹ҰׅͰࡱӨͰ͖ΔΑ͏ʹͯ͠Έͨ | Qiita • Compose for DeskopͰ࢝ΊΔAndroid։ൃޮ཰Խπʔϧͷ࡞੒ | Speaker Deck