PSync 是一个 Gradle 插件用于 Android 根据 XML Perferences 生成 Java 的替代方案。
安装设置:
buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "gradle.plugin.com.flipboard:psync:1.1.5" } } apply plugin: 'com.android.application' // Can be library too apply plugin: 'com.flipboard.psync'
配置方法:
psync { className = "MyClassName" includesPattern = "**/xml/<mypatternforfiles>.xml" packageName = "com.example.myapp" generateRx = true }