さらば proguard、ようこそ R8。

DSL element 'useProguard' is obsolete and will be removed soon. Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard..

DSL要素「useProguard」は廃止されており、まもなく削除されます。 gradle.propertiesで「android.enableR8」を使用して、R8とProguardを切り替えます。

gradle.properties


android.enableR8=true

build.gradle

とりあえずは、いけるが。

以下、編集風景。



しかし、minify とか、proguardFiles とか、どうなるの?

👉 Android Developers Blog: R8, the new code shrinker from Google, is available in Android studio 3.3 beta 


Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option

なんすかね、まったく。

Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option

[Preferences]-[Kotlin Compiler] から、[Target JVM version] を 「1.8」に。

ところが、同じエラーが出たまま。

対処法

以下を、build.gradle に。


android {
  kotlinOptions {
    jvmTarget = '1.8'
  }
}

Android Studio の便利そうに見える設定機能ってほとんどがあやしくね?

👉 intellij idea - Why kotlin gradle plugin cannot build with 1.8 target? - Stack Overflow 


Tracing the Origins of 'Presentation Model' in MVVM — and Martin Fowler’s Seven-Year-Old Insight

While researching things around “MVVM,” I kept seeing the term “Presentation Model,” so I decided to look into it.

Martin Fowler mentioned it — about seven years ago.


MVVM is the Microsoft's world's name for the same pattern as Presentation Model. I haven't updated the article since.

マイクロソフトの「MVVM」パターンは「Presentation Model」と同じなので、記事は更新していません。

👉 Martin Fowler on Twitter: "@HerberthAmaral MVVM is the Microsoft's world's name for the same pattern as Presentation Model. I haven't updated the article since." / Twitter 

I looked for the sources for each of them.

Presentation Model (Martin Fowler, 2004)

Represent the state and behavior of the presentation independently of the GUI controls used in the interface

👉 Presentation Model 

MVVM (Microsoft, 2005)

Model/View/ViewModel is a variation of Model/View/Controller (MVC) that is tailored for modern UI development platforms where the View is the responsibility of a designer rather than a classic developer. The designer is generally a more graphical, artistic focused person, and does less classic coding than a traditional developer.

👉 Introduction to Model/View/ViewModel pattern for building WPF apps – Tales from the Smart Client 

Conclusion

2012年4月現在、XAMLを使用するWPFなどのテクノロジ以外で使用されるMVVMは実質Presentation Modelと変わらず、Viewの抽象化などはできない。

👉 Model View ViewModel - Wikipedia (ja) 

MVVM is a variation of Martin Fowler's Presentation Model design pattern. MVVM abstracts a view's state and behavior in the same way, but a Presentation Model abstracts a view (creates a view model) in a manner not dependent on a specific user-interface platform.

👉 Model–view–viewmodel - Wikipedia (en)