Browse Source

【Token解析】增加MaterialDesignToken解析工具,已完成Sizing、Spacing、Color解析

liuxiaolong 2 years ago
parent
commit
fcf2c9020a
61 changed files with 8449 additions and 4028 deletions
  1. 1 0
      app/src/main/java/com/convenient/android/lib/DateUtilActivity.kt
  2. 2 2
      app/src/main/java/com/convenient/android/lib/ui/sample/ad/AdMainActivity.kt
  3. 1 1
      app/src/main/java/com/convenient/android/lib/ui/sample/read/ReaderActivity.kt
  4. 1 1
      lib_ad_core/src/main/java/com/composition/android/lib/ad/bean/AdUnitBean.kt
  5. 1 1
      lib_ad_core/src/main/java/com/composition/android/lib/ad/bean/AdUnitLoadConfig.kt
  6. 5 4
      lib_ad_core/src/main/java/com/composition/android/lib/ad/util/AdLog.kt
  7. 0 6
      lib_ad_gromore/src/main/java/com/composition/android/ad/gromore/load/request/GMBannerRequestImpl.kt
  8. 0 18
      lib_ad_gromore/src/main/res/layout/test_view.xml
  9. BIN
      lib_ad_repository/gro_more/ad_gromore_1.0.0_2022-12-08_release.aar
  10. 1 1
      lib_common/src/main/res/values/strings.xml
  11. 0 50
      lib_material_design_tokens/build.gradle
  12. BIN
      lib_material_design_tokens/libs/json-20220924.jar
  13. 0 21
      lib_material_design_tokens/proguard-rules.pro
  14. 0 22
      lib_material_design_tokens/src/androidTest/java/com/convenient/android/material/design/tokens/ExampleInstrumentedTest.kt
  15. 0 12
      lib_material_design_tokens/src/main/AndroidManifest.xml
  16. 0 25
      lib_material_design_tokens/src/main/java/com/convenient/android/material/design/tokens/MdTokenUtil.kt
  17. 0 69
      lib_material_design_tokens/src/main/java/com/convenient/android/material/design/tokens/category/MdParseGlobalUtil.kt
  18. 0 30
      lib_material_design_tokens/src/main/res/drawable-v24/ic_launcher_foreground.xml
  19. 0 170
      lib_material_design_tokens/src/main/res/drawable/ic_launcher_background.xml
  20. 0 5
      lib_material_design_tokens/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  21. 0 5
      lib_material_design_tokens/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  22. BIN
      lib_material_design_tokens/src/main/res/mipmap-hdpi/ic_launcher.webp
  23. BIN
      lib_material_design_tokens/src/main/res/mipmap-hdpi/ic_launcher_round.webp
  24. BIN
      lib_material_design_tokens/src/main/res/mipmap-mdpi/ic_launcher.webp
  25. BIN
      lib_material_design_tokens/src/main/res/mipmap-mdpi/ic_launcher_round.webp
  26. BIN
      lib_material_design_tokens/src/main/res/mipmap-xhdpi/ic_launcher.webp
  27. BIN
      lib_material_design_tokens/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
  28. BIN
      lib_material_design_tokens/src/main/res/mipmap-xxhdpi/ic_launcher.webp
  29. BIN
      lib_material_design_tokens/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
  30. BIN
      lib_material_design_tokens/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
  31. BIN
      lib_material_design_tokens/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
  32. 0 16
      lib_material_design_tokens/src/main/res/values-night/themes.xml
  33. 0 10
      lib_material_design_tokens/src/main/res/values/colors.xml
  34. 0 3
      lib_material_design_tokens/src/main/res/values/strings.xml
  35. 0 16
      lib_material_design_tokens/src/main/res/values/themes.xml
  36. 0 16
      lib_material_design_tokens/src/test/java/com/convenient/android/material/design/tokens/ExampleUnitTest.kt
  37. 0 330
      lib_material_design_tokens/tokens/alias.json
  38. 0 2506
      lib_material_design_tokens/tokens/composition.json
  39. 0 687
      lib_material_design_tokens/tokens/global.json
  40. 0 0
      lib_material_tokens/.gitignore
  41. 14 0
      lib_material_tokens/build.gradle
  42. BIN
      lib_material_tokens/libs/java-json.jar
  43. 77 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/MdParseGlobalUtil.kt
  44. 14 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/MdToken.kt
  45. 16 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/TokenCategory.kt
  46. 23 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/base/BaseXmlHandler.kt
  47. 64 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/base/FileUtil.kt
  48. 20 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/base/Log.kt
  49. 28 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/base/XMLUtil.kt
  50. 25 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/IParseToken.kt
  51. 50 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/ParseTokenFactory.kt
  52. 65 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/color/ColorParse.kt
  53. 45 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/color/ColorXmlParserHandler.kt
  54. 66 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/sizeing/SizeingParse.kt
  55. 46 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/sizeing/SizingXmlParserHandler.kt
  56. 65 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/spacing/SpacingParse.kt
  57. 46 0
      lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/spacing/SpacingXmlParserHandler.kt
  58. 938 0
      lib_material_tokens/src/tokens/alias-light.json
  59. 5445 0
      lib_material_tokens/src/tokens/comp-light.json
  60. 1389 0
      lib_material_tokens/src/tokens/global.json
  61. 1 1
      settings.gradle

+ 1 - 0
app/src/main/java/com/convenient/android/lib/DateUtilActivity.kt

@@ -1,6 +1,7 @@
 package com.convenient.android.lib
 
 import android.os.Bundle
+import androidx.core.text.isDigitsOnly
 import androidx.lifecycle.lifecycleScope
 import com.convenient.android.common.base.viewbinding.BaseBindingActivity
 import com.convenient.android.common.utils.date.*

+ 2 - 2
app/src/main/java/com/convenient/android/lib/ui/sample/ad/AdMainActivity.kt

@@ -32,9 +32,9 @@ class AdMainActivity : AppCompatActivity() {
         AdManager.instance.init(applicationContext, true)
         AdManager.instance.initAdvertisersSDK(applicationContext, AdmobInitialize(), CSJInitialize("5320990"), GroMoreInitialize("5320990"), AppLovinMaxInitialize(logging = true))
         val list = mutableListOf<AdUnitBean>()
-//        list.addAll(Datas.AdmobAdUnitList)
+        list.addAll(Datas.AdmobAdUnitList)
 //        list.addAll(Datas.CSJAdUnitList)
-        list.addAll(Datas.GroMoreAdUnitList)
+//        list.addAll(Datas.GroMoreAdUnitList)
 //        list.addAll(Datas.AppLovinMaxAdUnitList)
         AdUnitConfigManager.instance.setAdUnits(list)
         AdManager.instance.addGlobalAdShowListener {

+ 1 - 1
app/src/main/java/com/convenient/android/lib/ui/sample/read/ReaderActivity.kt

@@ -96,7 +96,7 @@ fun readerPage(life: LifecycleCoroutineScope?) {
                         isEncrypt {
                             ToastUtil.showToast(context, "文档已加密")
                             life.launch {
-                                it.retryOpenDocument(this@apply, absolutePath = "", password = "1234", normalOpenDocumentCallback = this@openDocument)
+                                it.retryOpenDocument(this@apply, absolutePath = "", password = "", normalOpenDocumentCallback = this@openDocument)
                             }
                         }
                     }

+ 1 - 1
lib_ad_core/src/main/java/com/composition/android/lib/ad/bean/AdUnitBean.kt

@@ -22,7 +22,7 @@ open class AdUnitBean(
     var adSize : IAdSize<*>?  = null,
     var loadStrategy : IStrategy = NormalStrategy(),
     var requestAdConfig: AdUnitLoadConfig = AdUnitLoadConfig()
-) {
+) : java.io.Serializable{
 
     companion object{
         fun emptyAdUnitBean() : AdUnitBean = AdUnitBean(adSlotName = "", advertisersName = "", adType = "", adUnitId = "")

+ 1 - 1
lib_ad_core/src/main/java/com/composition/android/lib/ad/bean/AdUnitLoadConfig.kt

@@ -16,4 +16,4 @@ data class AdUnitLoadConfig(
      */
     var adLoadTimeOut : Long = 8000
 
-)
+): java.io.Serializable

+ 5 - 4
lib_ad_core/src/main/java/com/composition/android/lib/ad/util/AdLog.kt

@@ -9,7 +9,7 @@ import com.composition.android.lib.ad.interfaces.IAdFormatRequest
 fun adLog(tag: String = AdManager.TAG, msg: String?) {
     if (AdManager.instance.logEnable) {
         msg?.let {
-            Log.d(tag, msg)
+            println(tag +": " + msg)
         }
     }
 }
@@ -24,9 +24,10 @@ fun adLogWithFrame(tag: String = AdManager.TAG, msg: String?) {
 fun adLogE(tag: String, msg: String?) {
     if (AdManager.instance.logEnable) {
         msg?.let {
-            Log.e(tag, "┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────")
-            Log.e(tag, "│ $msg")
-            Log.e(tag, "└────────────────────────────────────────────────────────────────────────────────────────────────────────────────")
+            System.err.println()
+            System.err.println(tag + " ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────")
+            System.err.println(tag + " │ $msg")
+            System.err.println(tag + " └────────────────────────────────────────────────────────────────────────────────────────────────────────────────")
         }
     }
 }

+ 0 - 6
lib_ad_gromore/src/main/java/com/composition/android/ad/gromore/load/request/GMBannerRequestImpl.kt

@@ -52,12 +52,6 @@ class GMBannerRequestImpl : IAdFormatRequest {
                         .setMuted(true)
                         .build()
 
-                    mTTBannerViewAd.setNativeToBannerListener(object : GMNativeToBannerListener(){
-                        override fun getGMBannerViewFromNativeAd(p0: GMNativeAdInfo?): View {
-                            adLogWithFrame(msg = "getGMBannerViewFromNativeAd")
-                            return LayoutInflater.from(context).inflate(R.layout.test_view, null)
-                        }
-                    })
                     mTTBannerViewAd.loadAd(slotBanner, object : GMBannerAdLoadCallback {
                         override fun onAdFailedToLoad(p0: AdError) {
                             printAdFailInfo(adUnitBean, p0.code, p0.message)

+ 0 - 18
lib_ad_gromore/src/main/res/layout/test_view.xml

@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="200dp"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        app:layout_constraintTop_toTopOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintBottom_toBottomOf="parent"
-        android:text="测试banner"
-        android:textSize="28sp"
-        />
-
-</androidx.constraintlayout.widget.ConstraintLayout>

BIN
lib_ad_repository/gro_more/ad_gromore_1.0.0_2022-12-08_release.aar


+ 1 - 1
lib_common/src/main/res/values/strings.xml

@@ -2,5 +2,5 @@
     <string name="notification_downloading">Downloading</string>
     <string name="activity_not_found">Not found App.</string>
     <string name="not_found_app">No related apps found</string>
-
+    <integer name="name"></integer>
 </resources>

+ 0 - 50
lib_material_design_tokens/build.gradle

@@ -1,50 +0,0 @@
-plugins {
-    id 'com.android.library'
-    id 'org.jetbrains.kotlin.android'
-}
-
-android {
-
-    namespace 'com.convenient.android.material.design.tokens'
-    compileSdk 32
-
-    defaultConfig {
-        minSdk 21
-        targetSdk 32
-        versionCode 1
-        versionName "1.0"
-
-        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
-    }
-
-    buildTypes {
-        release {
-            minifyEnabled false
-            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
-        }
-    }
-    compileOptions {
-        sourceCompatibility JavaVersion.VERSION_1_8
-        targetCompatibility JavaVersion.VERSION_1_8
-    }
-    kotlinOptions {
-        jvmTarget = '1.8'
-    }
-
-}
-
-dependencies {
-    implementation fileTree(dir: 'libs', include: ['*.jar'])
-
-    implementation 'androidx.core:core-ktx:1.7.0'
-    implementation 'androidx.appcompat:appcompat:1.5.1'
-    implementation 'com.google.android.material:material:1.7.0'
-    testImplementation 'junit:junit:4.13.2'
-    androidTestImplementation 'androidx.test.ext:junit:1.1.4'
-    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
-
-    api 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3'
-    api 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3'
-    api 'com.google.code.gson:gson:2.8.9'
-
-}

BIN
lib_material_design_tokens/libs/json-20220924.jar


+ 0 - 21
lib_material_design_tokens/proguard-rules.pro

@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile

+ 0 - 22
lib_material_design_tokens/src/androidTest/java/com/convenient/android/material/design/tokens/ExampleInstrumentedTest.kt

@@ -1,22 +0,0 @@
-package com.convenient.android.material.design.tokens
-
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.platform.app.InstrumentationRegistry
-import org.junit.Assert.*
-import org.junit.Test
-import org.junit.runner.RunWith
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-@RunWith(AndroidJUnit4::class)
-class ExampleInstrumentedTest {
-    @Test
-    fun useAppContext() {
-        // Context of the app under test.
-        val appContext = InstrumentationRegistry.getInstrumentation().targetContext
-        assertEquals("com.convenient.android.material.design.tokens", appContext.packageName)
-    }
-}

+ 0 - 12
lib_material_design_tokens/src/main/AndroidManifest.xml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <application
-        android:allowBackup="true"
-        android:icon="@mipmap/ic_launcher"
-        android:label="@string/app_name"
-        android:roundIcon="@mipmap/ic_launcher_round"
-        android:supportsRtl="true"
-        android:theme="@style/Theme.Lib" />
-
-</manifest>

+ 0 - 25
lib_material_design_tokens/src/main/java/com/convenient/android/material/design/tokens/MdTokenUtil.kt

@@ -1,25 +0,0 @@
-package com.convenient.android.material.design.tokens
-
-import com.convenient.android.material.design.tokens.category.MdParseGlobalUtil
-
-/**
- * @classname:
- * @author: LiuXiaoLong
- * @date: 2022/11/9
- * description:
- */
-class MdTokenUtil {
-
-
-}
-
-fun main() {
-
-    val globalTokenUtil = MdParseGlobalUtil("./lib_material_design_tokens/tokens/global.json")
-    globalTokenUtil.start()
-
-
-
-
-
-}

+ 0 - 69
lib_material_design_tokens/src/main/java/com/convenient/android/material/design/tokens/category/MdParseGlobalUtil.kt

@@ -1,69 +0,0 @@
-package com.convenient.android.material.design.tokens.category
-
-import org.json.JSONObject
-import java.io.File
-
-/**
- * @classname:
- * @author: LiuXiaoLong
- * @date: 2022/11/9
- * description:
- */
-class MdParseGlobalUtil(var filePath: String) {
-
-
-    fun start() {
-
-        try {
-            var file = File(filePath)
-            var json = file.readText()
-            parseCategoryMap(json)
-
-        } catch (e: Exception) {
-            e.printStackTrace()
-        }
-    }
-
-    private fun parseCategoryMap(json: String): HashMap<String, TokenBean> {
-        var jsonObj = JSONObject(json)
-        parseObj(jsonObj)
-
-        return hashMapOf()
-    }
-
-    private fun parseObj(obj: JSONObject) {
-
-        val iterator = obj.keys()
-        if (iterator.hasNext()) {
-            val key = iterator.next().toString()
-            val valueObj = obj.get(key)
-
-            if (valueObj is JSONObject) {
-                parseObj(valueObj)
-            } else {
-
-                println("key:${key}, value:${valueObj}")
-            }
-
-        }
-
-    }
-
-
-    /**
-     * 解析尺寸
-     */
-    private fun parseSizing(json: String): List<Pair<String, String>> {
-
-        return emptyList()
-    }
-
-
-}
-
-data class TokenBean(
-    var type: String,
-    var value: String,
-    var currentLevelTokenName: String,
-    var parentLevelTokenNames: List<String>
-)

File diff suppressed because it is too large
+ 0 - 30
lib_material_design_tokens/src/main/res/drawable-v24/ic_launcher_foreground.xml


+ 0 - 170
lib_material_design_tokens/src/main/res/drawable/ic_launcher_background.xml

@@ -1,170 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="108dp"
-    android:height="108dp"
-    android:viewportWidth="108"
-    android:viewportHeight="108">
-    <path
-        android:fillColor="#3DDC84"
-        android:pathData="M0,0h108v108h-108z" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M9,0L9,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,0L19,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M29,0L29,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M39,0L39,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M49,0L49,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M59,0L59,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M69,0L69,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M79,0L79,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M89,0L89,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M99,0L99,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,9L108,9"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,19L108,19"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,29L108,29"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,39L108,39"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,49L108,49"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,59L108,59"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,69L108,69"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,79L108,79"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,89L108,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,99L108,99"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,29L89,29"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,39L89,39"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,49L89,49"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,59L89,59"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,69L89,69"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,79L89,79"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M29,19L29,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M39,19L39,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M49,19L49,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M59,19L59,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M69,19L69,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M79,19L79,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-</vector>

+ 0 - 5
lib_material_design_tokens/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>

+ 0 - 5
lib_material_design_tokens/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>

BIN
lib_material_design_tokens/src/main/res/mipmap-hdpi/ic_launcher.webp


BIN
lib_material_design_tokens/src/main/res/mipmap-hdpi/ic_launcher_round.webp


BIN
lib_material_design_tokens/src/main/res/mipmap-mdpi/ic_launcher.webp


BIN
lib_material_design_tokens/src/main/res/mipmap-mdpi/ic_launcher_round.webp


BIN
lib_material_design_tokens/src/main/res/mipmap-xhdpi/ic_launcher.webp


BIN
lib_material_design_tokens/src/main/res/mipmap-xhdpi/ic_launcher_round.webp


BIN
lib_material_design_tokens/src/main/res/mipmap-xxhdpi/ic_launcher.webp


BIN
lib_material_design_tokens/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp


BIN
lib_material_design_tokens/src/main/res/mipmap-xxxhdpi/ic_launcher.webp


BIN
lib_material_design_tokens/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp


+ 0 - 16
lib_material_design_tokens/src/main/res/values-night/themes.xml

@@ -1,16 +0,0 @@
-<resources>
-    <!-- Base application theme. -->
-    <style name="Theme.Lib" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
-        <!-- Primary brand color. -->
-        <item name="colorPrimary">@color/purple_200</item>
-        <item name="colorPrimaryVariant">@color/purple_700</item>
-        <item name="colorOnPrimary">@color/black</item>
-        <!-- Secondary brand color. -->
-        <item name="colorSecondary">@color/teal_200</item>
-        <item name="colorSecondaryVariant">@color/teal_200</item>
-        <item name="colorOnSecondary">@color/black</item>
-        <!-- Status bar color. -->
-        <item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
-        <!-- Customize your theme here. -->
-    </style>
-</resources>

+ 0 - 10
lib_material_design_tokens/src/main/res/values/colors.xml

@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-    <color name="purple_200">#FFBB86FC</color>
-    <color name="purple_500">#FF6200EE</color>
-    <color name="purple_700">#FF3700B3</color>
-    <color name="teal_200">#FF03DAC5</color>
-    <color name="teal_700">#FF018786</color>
-    <color name="black">#FF000000</color>
-    <color name="white">#FFFFFFFF</color>
-</resources>

+ 0 - 3
lib_material_design_tokens/src/main/res/values/strings.xml

@@ -1,3 +0,0 @@
-<resources>
-    <string name="app_name">lib_material_design_tokens</string>
-</resources>

+ 0 - 16
lib_material_design_tokens/src/main/res/values/themes.xml

@@ -1,16 +0,0 @@
-<resources>
-    <!-- Base application theme. -->
-    <style name="Theme.Lib" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
-        <!-- Primary brand color. -->
-        <item name="colorPrimary">@color/purple_500</item>
-        <item name="colorPrimaryVariant">@color/purple_700</item>
-        <item name="colorOnPrimary">@color/white</item>
-        <!-- Secondary brand color. -->
-        <item name="colorSecondary">@color/teal_200</item>
-        <item name="colorSecondaryVariant">@color/teal_700</item>
-        <item name="colorOnSecondary">@color/black</item>
-        <!-- Status bar color. -->
-        <item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
-        <!-- Customize your theme here. -->
-    </style>
-</resources>

+ 0 - 16
lib_material_design_tokens/src/test/java/com/convenient/android/material/design/tokens/ExampleUnitTest.kt

@@ -1,16 +0,0 @@
-package com.convenient.android.material.design.tokens
-
-import org.junit.Assert.assertEquals
-import org.junit.Test
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-class ExampleUnitTest {
-    @Test
-    fun addition_isCorrect() {
-        assertEquals(4, 2 + 2)
-    }
-}

+ 0 - 330
lib_material_design_tokens/tokens/alias.json

@@ -1,330 +0,0 @@
-{
-  "spacing": {
-    "btn": {
-      "large": {
-        "left": {
-          "value": "{spacing.24}",
-          "type": "spacing"
-        },
-        "right": {
-          "value": "{spacing.24}",
-          "type": "spacing"
-        }
-      },
-      "medium": {
-        "left": {
-          "value": "{spacing.16}",
-          "type": "spacing"
-        },
-        "right": {
-          "value": "{spacing.16}",
-          "type": "spacing"
-        }
-      },
-      "small": {
-        "left": {
-          "value": "{spacing.8}",
-          "type": "spacing"
-        },
-        "right": {
-          "value": "{spacing.8}",
-          "type": "spacing"
-        }
-      }
-    }
-  },
-  "color": {
-    "font": {
-      "primary": {
-        "value": "{color.neutral.gray11}",
-        "type": "color"
-      },
-      "secondary": {
-        "value": "{color.neutral.gray9}",
-        "type": "color"
-      },
-      "thirdry": {
-        "value": "{color.neutral.gray7}",
-        "type": "color"
-      },
-      "disabled": {
-        "value": "{color.neutral.gray6}",
-        "type": "color"
-      },
-      "anti": {
-        "value": "{color.neutral.gray1}",
-        "type": "color"
-      }
-    },
-    "btn_bg_accent": {
-      "default": {
-        "value": "{color.accent.blue6}",
-        "type": "color"
-      },
-      "hover": {
-        "value": "{color.accent.blue5}",
-        "type": "color"
-      },
-      "active": {
-        "value": "{color.accent.blue7}",
-        "type": "color"
-      },
-      "disabled": {
-        "value": "{color.accent.blue3}",
-        "type": "color"
-      }
-    },
-    "fill": {
-      "anti": {
-        "value": "{color.neutral.gray1}",
-        "type": "color"
-      },
-      "hover": {
-        "value": "{color.neutral.gray3}",
-        "type": "color"
-      },
-      "active": {
-        "value": "{color.neutral.gray4}",
-        "type": "color"
-      },
-      "disabled": {
-        "value": "{color.neutral.gray3}",
-        "type": "color"
-      }
-    },
-    "error": {
-      "default": {
-        "value": "{color.functional.error.red6}",
-        "type": "color"
-      },
-      "hover": {
-        "value": "{color.functional.error.red5}",
-        "type": "color"
-      },
-      "active": {
-        "value": "{color.functional.error.red7}",
-        "type": "color"
-      },
-      "disabled": {
-        "value": "{color.functional.error.red3}",
-        "type": "color"
-      }
-    },
-    "warning": {
-      "default": {
-        "value": "{color.functional.warnning.gold6}",
-        "type": "color"
-      },
-      "hover": {
-        "value": "{color.functional.warnning.gold5}",
-        "type": "color"
-      },
-      "active": {
-        "value": "{color.functional.warnning.gold7}",
-        "type": "color"
-      },
-      "disabled": {
-        "value": "{color.functional.warnning.gold3}",
-        "type": "color"
-      }
-    },
-    "success": {
-      "default": {
-        "value": "{color.functional.success.green6}",
-        "type": "color"
-      },
-      "hover": {
-        "value": "{color.other.cyan.cyan5}",
-        "type": "color"
-      },
-      "active": {
-        "value": "{color.functional.success.green7}",
-        "type": "color"
-      },
-      "disabled": {
-        "value": "{color.functional.success.green3}",
-        "type": "color"
-      }
-    },
-    "btn_bg_brand": {
-      "default": {
-        "value": "{color.brand.navyblue6}",
-        "type": "color"
-      },
-      "hover": {
-        "value": "{color.brand.navyblue5}",
-        "type": "color"
-      },
-      "active": {
-        "value": "{color.brand.navyblue7}",
-        "type": "color"
-      },
-      "disabled": {
-        "value": "{color.brand.navyblue3}",
-        "type": "color"
-      }
-    },
-    "component_border": {
-      "value": "{color.neutral.gray4}",
-      "type": "color"
-    },
-    "stroke": {
-      "value": "{color.neutral.gray3}",
-      "type": "color"
-    },
-    "btn_bg_normal": {
-      "default": {
-        "value": "{color.neutral.gray3}",
-        "type": "color"
-      },
-      "hover": {
-        "value": "{color.neutral.gray4}",
-        "type": "color"
-      },
-      "active": {
-        "value": "{color.neutral.gray5}",
-        "type": "color"
-      },
-      "disabled": {
-        "value": "{color.neutral.gray3}",
-        "type": "color"
-      }
-    }
-  },
-  "sizing": {
-    "icon": {
-      "xsmall": {
-        "value": "{sizing.12}",
-        "type": "sizing"
-      },
-      "small": {
-        "value": "{sizing.14}",
-        "type": "sizing"
-      },
-      "medium": {
-        "value": "{sizing.16}",
-        "type": "sizing"
-      },
-      "xlarge": {
-        "value": "{sizing.20}",
-        "type": "sizing"
-      }
-    },
-    "btn": {
-      "small": {
-        "value": "24",
-        "type": "sizing"
-      },
-      "medium": {
-        "value": "32",
-        "type": "sizing"
-      },
-      "large": {
-        "value": "40",
-        "type": "sizing"
-      }
-    }
-  },
-  "border_radius": {
-    "btn": {
-      "full": {
-        "large": {
-          "value": "{border_radius.20}",
-          "type": "borderRadius"
-        },
-        "medium": {
-          "value": "{border_radius.16}",
-          "type": "borderRadius"
-        },
-        "small": {
-          "value": "{border_radius.12}",
-          "type": "borderRadius"
-        }
-      },
-      "round": {
-        "normal": {
-          "value": "{border_radius.4}",
-          "type": "borderRadius"
-        }
-      }
-    },
-    "card": {
-      "small": {
-        "value": "{border_radius.4}",
-        "type": "borderRadius"
-      },
-      "medium": {
-        "value": "8",
-        "type": "borderRadius"
-      }
-    }
-  },
-  "font_size": {
-    "footnote": {
-      "value": "{font_size.10}",
-      "type": "fontSizes"
-    },
-    "sub_body": {
-      "value": "{font_size.12}",
-      "type": "fontSizes"
-    },
-    "body": {
-      "value": "{font_size.14}",
-      "type": "fontSizes"
-    },
-    "sub_title": {
-      "value": "{font_size.16}",
-      "type": "fontSizes"
-    },
-    "title": {
-      "value": "{font_size.20}",
-      "type": "fontSizes"
-    },
-    "headline": {
-      "value": "{font_size.24}",
-      "type": "fontSizes"
-    }
-  },
-  "border_width": {
-    "normal": {
-      "value": "{border_width.1}",
-      "type": "borderWidth"
-    }
-  },
-  "lint_height": {
-    "footnote": {
-      "value": "{line_height.18}",
-      "type": "lineHeights"
-    },
-    "sub_body": {
-      "value": "{line_height.20}",
-      "type": "lineHeights"
-    },
-    "body": {
-      "value": "{line_height.22}",
-      "type": "lineHeights"
-    },
-    "sub_title": {
-      "value": "{line_height.24}",
-      "type": "lineHeights"
-    },
-    "title": {
-      "value": "{line_height.28}",
-      "type": "lineHeights"
-    },
-    "headline": {
-      "value": "{line_height.40}",
-      "type": "lineHeights"
-    }
-  },
-  "font_weight": {
-    "regular": {
-      "value": "{font_weight.400}",
-      "type": "fontWeights"
-    },
-    "bold": {
-      "value": "{font_weight.600}",
-      "type": "fontWeights"
-    }
-  }
-}

File diff suppressed because it is too large
+ 0 - 2506
lib_material_design_tokens/tokens/composition.json


+ 0 - 687
lib_material_design_tokens/tokens/global.json

@@ -1,687 +0,0 @@
-{
-  "sizing": {
-    "12": {
-      "value": "12",
-      "type": "sizing"
-    },
-    "14": {
-      "value": "14",
-      "type": "sizing"
-    },
-    "16": {
-      "value": "16",
-      "type": "sizing"
-    },
-    "18": {
-      "value": "18",
-      "type": "sizing"
-    },
-    "20": {
-      "value": "20",
-      "type": "sizing"
-    },
-    "24": {
-      "value": "24",
-      "type": "sizing"
-    },
-    "28": {
-      "value": "28",
-      "type": "sizing"
-    },
-    "32": {
-      "value": "32",
-      "type": "sizing"
-    },
-    "34": {
-      "value": "34",
-      "type": "sizing"
-    },
-    "40": {
-      "value": "40",
-      "type": "sizing"
-    },
-    "48": {
-      "value": "48",
-      "type": "sizing"
-    },
-    "64": {
-      "value": "64",
-      "type": "sizing"
-    },
-    "110": {
-      "value": "110",
-      "type": "sizing"
-    },
-    "116": {
-      "value": "116",
-      "type": "sizing"
-    },
-    "228": {
-      "value": "228",
-      "type": "sizing"
-    }
-  },
-  "spacing": {
-    "2": {
-      "value": "2",
-      "type": "spacing"
-    },
-    "4": {
-      "value": "4",
-      "type": "spacing"
-    },
-    "5": {
-      "value": "5",
-      "type": "spacing"
-    },
-    "8": {
-      "value": "8",
-      "type": "spacing"
-    },
-    "10": {
-      "value": "10",
-      "type": "spacing"
-    },
-    "12": {
-      "value": "12",
-      "type": "spacing"
-    },
-    "16": {
-      "value": "16",
-      "type": "spacing"
-    },
-    "24": {
-      "value": "24",
-      "type": "spacing"
-    },
-    "32": {
-      "value": "32",
-      "type": "spacing"
-    }
-  },
-  "color": {
-    "accent": {
-      "blue1": {
-        "value": "#E8F5FF",
-        "type": "color"
-      },
-      "blue2": {
-        "value": "#BDDFFD",
-        "type": "color"
-      },
-      "blue3": {
-        "value": "#92C6FB",
-        "type": "color"
-      },
-      "blue4": {
-        "value": "#68acf8",
-        "type": "color"
-      },
-      "blue5": {
-        "value": "#3f8ff6",
-        "type": "color"
-      },
-      "blue6": {
-        "value": "#1770F4",
-        "type": "color"
-      },
-      "blue7": {
-        "value": "#0e53ca",
-        "type": "color"
-      },
-      "blue8": {
-        "value": "#083aa0",
-        "type": "color"
-      },
-      "blue9": {
-        "value": "#032576",
-        "type": "color"
-      },
-      "blue10": {
-        "value": "#00144d",
-        "type": "color"
-      }
-    },
-    "neutral": {
-      "gray1": {
-        "value": "#ffffff",
-        "type": "color"
-      },
-      "gray2": {
-        "value": "#F7F8FA",
-        "type": "color"
-      },
-      "gray3": {
-        "value": "#EDEEF0",
-        "type": "color"
-      },
-      "gray4": {
-        "value": "#DFE1E5",
-        "type": "color"
-      },
-      "gray5": {
-        "value": "#CED0D4",
-        "type": "color"
-      },
-      "gray6": {
-        "value": "#B1B3B8",
-        "type": "color"
-      },
-      "gray7": {
-        "value": "#94989C",
-        "type": "color"
-      },
-      "gray8": {
-        "value": "#7C8085",
-        "type": "color"
-      },
-      "gray9": {
-        "value": "#616469",
-        "type": "color"
-      },
-      "gray10": {
-        "value": "#36383B",
-        "type": "color"
-      },
-      "gray11": {
-        "value": "#252629",
-        "type": "color"
-      }
-    },
-    "brand": {
-      "navyblue1": {
-        "value": "#E8F4FF",
-        "type": "color"
-      },
-      "navyblue2": {
-        "value": "#B5C9E0",
-        "type": "color"
-      },
-      "navyblue3": {
-        "value": "#88A1C0",
-        "type": "color"
-      },
-      "navyblue4": {
-        "value": "#617CA1",
-        "type": "color"
-      },
-      "navyblue5": {
-        "value": "#415A81",
-        "type": "color"
-      },
-      "navyblue6": {
-        "value": "#273C62",
-        "type": "color"
-      },
-      "navyblue7": {
-        "value": "#1C305D",
-        "type": "color"
-      },
-      "navyblue8": {
-        "value": "#112557",
-        "type": "color"
-      },
-      "navyblue9": {
-        "value": "#081B52",
-        "type": "color"
-      },
-      "navyblue10": {
-        "value": "#00114D",
-        "type": "color"
-      }
-    },
-    "functional": {
-      "success": {
-        "green1": {
-          "value": "#E8FFF4",
-          "type": "color"
-        },
-        "green2": {
-          "value": "#BAF7DA",
-          "type": "color"
-        },
-        "green3": {
-          "value": "#8EEEC4",
-          "type": "color"
-        },
-        "green4": {
-          "value": "#64E6B2",
-          "type": "color"
-        },
-        "green5": {
-          "value": "#3EDDA3",
-          "type": "color"
-        },
-        "green6": {
-          "value": "#1AD598",
-          "type": "color"
-        },
-        "green7": {
-          "value": "#10B382",
-          "type": "color"
-        },
-        "green8": {
-          "value": "#09916D",
-          "type": "color"
-        },
-        "green9": {
-          "value": "#036F56",
-          "type": "color"
-        },
-        "green10": {
-          "value": "#004D3D",
-          "type": "color"
-        }
-      },
-      "warnning": {
-        "gold1": {
-          "value": "#FFFAE8",
-          "type": "color"
-        },
-        "gold2": {
-          "value": "#FFF1C1",
-          "type": "color"
-        },
-        "gold3": {
-          "value": "#FFE49A",
-          "type": "color"
-        },
-        "gold4": {
-          "value": "#FFD573",
-          "type": "color"
-        },
-        "gold5": {
-          "value": "#FFC34C",
-          "type": "color"
-        },
-        "gold6": {
-          "value": "#FFAF25",
-          "type": "color"
-        },
-        "gold7": {
-          "value": "#D28717",
-          "type": "color"
-        },
-        "gold8": {
-          "value": "#A6630C",
-          "type": "color"
-        },
-        "gold9": {
-          "value": "#794304",
-          "type": "color"
-        },
-        "gold10": {
-          "value": "#4D2600",
-          "type": "color"
-        }
-      },
-      "error": {
-        "red1": {
-          "value": "#FFE9E8",
-          "type": "color"
-        },
-        "red2": {
-          "value": "#FDC7C6",
-          "type": "color"
-        },
-        "red3": {
-          "value": "#FAA5A7",
-          "type": "color"
-        },
-        "red4": {
-          "value": "#F8858B",
-          "type": "color"
-        },
-        "red5": {
-          "value": "#F56571",
-          "type": "color"
-        },
-        "red6": {
-          "value": "#F3465B",
-          "type": "color"
-        },
-        "red7": {
-          "value": "#C92C43",
-          "type": "color"
-        },
-        "red8": {
-          "value": "#A01730",
-          "type": "color"
-        },
-        "red9": {
-          "value": "#760920",
-          "type": "color"
-        },
-        "red10": {
-          "value": "#4D0013",
-          "type": "color"
-        }
-      }
-    },
-    "other": {
-      "orange": {
-        "orange1": {
-          "value": "#FFF5E8",
-          "type": "color"
-        },
-        "orange2": {
-          "value": "#FFE4C3",
-          "type": "color"
-        },
-        "orange3": {
-          "value": "#FFD09E",
-          "type": "color"
-        },
-        "orange4": {
-          "value": "#FFB978",
-          "type": "color"
-        },
-        "orange5": {
-          "value": "#FFA153",
-          "type": "color"
-        },
-        "orange6": {
-          "value": "#FF852E",
-          "type": "color"
-        },
-        "orange7": {
-          "value": "#D2621C",
-          "type": "color"
-        },
-        "orange8": {
-          "value": "#A6440F",
-          "type": "color"
-        },
-        "orange9": {
-          "value": "#792A05",
-          "type": "color"
-        },
-        "orange10": {
-          "value": "#4D1600",
-          "type": "color"
-        }
-      },
-      "cyan": {
-        "cyan1": {
-          "value": "#E8FFFB",
-          "type": "color"
-        },
-        "cyan2": {
-          "value": "#B7F4EC",
-          "type": "color"
-        },
-        "cyan3": {
-          "value": "#89E9E0",
-          "type": "color"
-        },
-        "cyan4": {
-          "value": "#5EDFD6",
-          "type": "color"
-        },
-        "cyan5": {
-          "value": "#37D4CF",
-          "type": "color"
-        },
-        "cyan6": {
-          "value": "#14C9C9",
-          "type": "color"
-        },
-        "cyan7": {
-          "value": "#0DA5AA",
-          "type": "color"
-        },
-        "cyan8": {
-          "value": "#07828B",
-          "type": "color"
-        },
-        "cyan9": {
-          "value": "#03616C",
-          "type": "color"
-        },
-        "cyan10": {
-          "value": "#03616C",
-          "type": "color"
-        }
-      },
-      "purple": {
-        "purple1": {
-          "value": "#F2E8FF",
-          "type": "color"
-        },
-        "purple2": {
-          "value": "#DBC3FE",
-          "type": "color"
-        },
-        "purple3": {
-          "value": "#C29EFC",
-          "type": "color"
-        },
-        "purple4": {
-          "value": "#A77AFB",
-          "type": "color"
-        },
-        "purple5": {
-          "value": "#8A56F9",
-          "type": "color"
-        },
-        "purple6": {
-          "value": "#6C33F8",
-          "type": "color"
-        },
-        "purple7": {
-          "value": "#4B20CD",
-          "type": "color"
-        },
-        "purple8": {
-          "value": "#3011A2",
-          "type": "color"
-        },
-        "purple9": {
-          "value": "#1B0677",
-          "type": "color"
-        },
-        "purple10": {
-          "value": "#0B004D",
-          "type": "color"
-        }
-      },
-      "pink": {
-        "pink1": {
-          "value": "#FFE8F5",
-          "type": "color"
-        },
-        "pink2": {
-          "value": "#FDC4E6",
-          "type": "color"
-        },
-        "pink3": {
-          "value": "#FBA0DA",
-          "type": "color"
-        },
-        "pink4": {
-          "value": "#FA7CD0",
-          "type": "color"
-        },
-        "pink5": {
-          "value": "#F859C8",
-          "type": "color"
-        },
-        "pink6": {
-          "value": "#F637C4",
-          "type": "color"
-        },
-        "pink7": {
-          "value": "#CC22A4",
-          "type": "color"
-        },
-        "pink8": {
-          "value": "#A11285",
-          "type": "color"
-        },
-        "pink9": {
-          "value": "#770764",
-          "type": "color"
-        },
-        "pink10": {
-          "value": "#4D0042",
-          "type": "color"
-        }
-      }
-    }
-  },
-  "border_radius": {
-    "2": {
-      "value": "2",
-      "type": "borderRadius"
-    },
-    "4": {
-      "value": "4",
-      "type": "borderRadius"
-    },
-    "6": {
-      "value": "6",
-      "type": "borderRadius"
-    },
-    "8": {
-      "value": "8",
-      "type": "borderRadius"
-    },
-    "12": {
-      "value": "12",
-      "type": "borderRadius"
-    },
-    "16": {
-      "value": "16",
-      "type": "borderRadius"
-    },
-    "20": {
-      "value": "20",
-      "type": "borderRadius"
-    }
-  },
-  "font_size": {
-    "10": {
-      "value": "10",
-      "type": "fontSizes"
-    },
-    "12": {
-      "value": "12",
-      "type": "fontSizes"
-    },
-    "14": {
-      "value": "14",
-      "type": "fontSizes"
-    },
-    "16": {
-      "value": "16",
-      "type": "fontSizes"
-    },
-    "20": {
-      "value": "20",
-      "type": "fontSizes"
-    },
-    "24": {
-      "value": "24",
-      "type": "fontSizes"
-    }
-  },
-  "border_width": {
-    "1": {
-      "value": "1",
-      "type": "borderWidth"
-    }
-  },
-  "font_weight": {
-    "400": {
-      "value": "400",
-      "type": "fontWeights"
-    },
-    "600": {
-      "value": "600",
-      "type": "fontWeights"
-    }
-  },
-  "line_height": {
-    "18": {
-      "value": "18",
-      "type": "lineHeights"
-    },
-    "20": {
-      "value": "20",
-      "type": "lineHeights"
-    },
-    "22": {
-      "value": "22",
-      "type": "lineHeights"
-    },
-    "24": {
-      "value": "24",
-      "type": "lineHeights"
-    },
-    "28": {
-      "value": "28",
-      "type": "lineHeights"
-    },
-    "32": {
-      "value": "32",
-      "type": "lineHeights"
-    },
-    "40": {
-      "value": "40",
-      "type": "lineHeights"
-    }
-  },
-  "shadow": {
-    "normal_2": {
-      "value": {
-        "x": "0",
-        "y": "2",
-        "blur": "2",
-        "spread": "0",
-        "color": "#000000",
-        "type": "dropShadow"
-      },
-      "type": "boxShadow"
-    },
-    "accent_2": {
-      "value": {
-        "x": "0",
-        "y": "0",
-        "blur": "4",
-        "spread": "0",
-        "color": "{color.accent.blue3}",
-        "type": "dropShadow"
-      },
-      "type": "boxShadow"
-    },
-    "error_4": {
-      "value": {
-        "x": "0",
-        "y": "0",
-        "blur": "4",
-        "spread": "0",
-        "color": "{color.functional.error.red3}",
-        "type": "dropShadow"
-      },
-      "type": "boxShadow"
-    }
-  },
-  "opacity": {
-    "10%": {
-      "value": "10%",
-      "type": "opacity"
-    },
-    "20%": {
-      "value": "20%",
-      "type": "opacity"
-    },
-    "40%": {
-      "value": "40%",
-      "type": "opacity"
-    },
-    "60%": {
-      "value": "60%",
-      "type": "opacity"
-    }
-  }
-}

lib_material_design_tokens/.gitignore → lib_material_tokens/.gitignore


+ 14 - 0
lib_material_tokens/build.gradle

@@ -0,0 +1,14 @@
+plugins {
+    id 'java-library'
+    id 'org.jetbrains.kotlin.jvm'
+}
+
+java {
+    sourceCompatibility = JavaVersion.VERSION_1_7
+    targetCompatibility = JavaVersion.VERSION_1_7
+}
+
+dependencies {
+    implementation files('libs/java-json.jar')
+
+}

BIN
lib_material_tokens/libs/java-json.jar


+ 77 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/MdParseGlobalUtil.kt

@@ -0,0 +1,77 @@
+package com.kdanmobile.android.lib.material.tokens.category
+
+import com.kdanmobile.android.lib.material.tokens.TokenCategory
+import com.kdanmobile.android.lib.material.tokens.category.color.ColorParse
+import com.kdanmobile.android.lib.material.tokens.category.sizeing.SizeingParse
+import com.kdanmobile.android.lib.material.tokens.category.spacing.SpacingParse
+import org.json.JSONObject
+import java.io.File
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2022/11/9
+ * description:
+ */
+class MdParseGlobalUtil(var filePath: String, var destFolderPath : String) {
+
+
+    fun start() {
+
+        try {
+            val file = File(filePath)
+            val json = file.readText()
+            parseCategoryMap(json)
+
+        } catch (e: Exception) {
+            e.printStackTrace()
+        }
+    }
+
+    private fun parseCategoryMap(json: String): HashMap<String, TokenBean> {
+        val jsonObj = JSONObject(json)
+        val map = getTokensCategoryData(jsonObj)
+        for (entry in map) {
+            val parse = ParseTokenFactory.factory(entry.key)
+            parse?.parse(entry.key, entry.value)
+            parse?.generateTokenFile(ParseTokenFactory.getSavePathByCategory(destFolderPath, entry.key))
+        }
+
+
+        return hashMapOf()
+    }
+
+    /**
+     * 获取Token分类数据
+     */
+    private fun getTokensCategoryData(obj: JSONObject): Map<String, JSONObject> {
+
+        val iterator = obj.keys()
+        val maps = mutableMapOf<String, JSONObject>()
+        for (any in iterator) {
+            val valueObj = obj.get(any.toString())
+            maps[any.toString()] = valueObj as JSONObject
+        }
+        println(maps)
+        return maps
+    }
+
+
+
+
+    /**
+     * 解析尺寸
+     */
+    private fun parseSizing(json: String): List<Pair<String, String>> {
+
+        return emptyList()
+    }
+
+}
+
+data class TokenBean(
+    var type: String,
+    var value: String,
+    var currentLevelTokenName: String,
+    var parentLevelTokenNames: List<String>
+)

+ 14 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/MdToken.kt

@@ -0,0 +1,14 @@
+package com.kdanmobile.android.lib.material.tokens
+
+import com.kdanmobile.android.lib.material.tokens.category.MdParseGlobalUtil
+
+
+
+fun main() {
+
+    val globalTokenUtil = MdParseGlobalUtil("./lib_material_tokens/src/tokens/global.json","./lib_material_tokens/src/")
+    globalTokenUtil.start()
+
+
+
+}

+ 16 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/TokenCategory.kt

@@ -0,0 +1,16 @@
+package com.kdanmobile.android.lib.material.tokens
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description:
+ */
+enum class TokenCategory {
+
+    sizing,
+
+    spacing,
+    color,
+
+}

+ 23 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/base/BaseXmlHandler.kt

@@ -0,0 +1,23 @@
+package com.kdanmobile.android.lib.material.tokens.base
+
+import org.xml.sax.helpers.DefaultHandler
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description:
+ */
+open class BaseXmlHandler : DefaultHandler() {
+
+    var maps: MutableMap<String, String> = mutableMapOf()
+
+    var value: String? = null
+
+    var name: String? = null
+
+    fun getExistsMapValues(): MutableMap<String, String> {
+        return maps
+    }
+
+}

+ 64 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/base/FileUtil.kt

@@ -0,0 +1,64 @@
+package com.kdanmobile.android.lib.material.tokens.base
+
+import com.kdanmobile.android.lib.material.tokens.category.spacing.SpacingXmlParserHandler
+import java.io.File
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description:
+ */
+object FileUtil {
+
+
+    /**
+     * 写入token
+     * @param file 写入的文件
+     * @param xmlItemName 条目名称: integer、color...
+     * @param token 写入的数据
+     */
+    fun writeTokens(file: File, xmlItemName : String, token : List<Pair<String, String>>){
+        file.bufferedWriter().use {
+            it.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
+            it.append("<resources>\n")
+            for (pair in token) {
+                it.append("    <${xmlItemName} name=\"${pair.first}\">${pair.second}</${xmlItemName}>\n")
+            }
+            it.append("</resources>")
+        }
+    }
+
+
+    fun parseAndMergeOldData(tag : String, file: File, baseXmlHandler: BaseXmlHandler, inputMap: Map<String, String>): List<Pair<String, String>>{
+        val outPutMap = mutableMapOf<String, String>()
+        if (file.exists()) {
+            //文件已存在,获取到当前已经存在的sizing数据
+            val existsDataMap = XMLUtil.getFileXmlData(file, baseXmlHandler)
+            val iterator = existsDataMap.iterator()
+            while (iterator.hasNext()){
+                val entry = iterator.next()
+                if (inputMap.containsKey(entry.key).not()) {
+                    logT(tag, "移除${entry.key}:${entry.value}")
+                    iterator.remove()
+                }
+            }
+            inputMap.forEach {
+                if (existsDataMap.containsKey(it.key).not()){
+                    logT(tag,"新增:${it.key}:${it.value}")
+                }
+            }
+            outPutMap.putAll(existsDataMap)
+        } else {
+            if (file.parentFile.exists().not()) {
+                file.parentFile.mkdirs()
+            }
+            file.createNewFile()
+        }
+        outPutMap.putAll(inputMap)
+        return outPutMap.toList().sortedBy {
+            it.second
+        }
+    }
+
+}

+ 20 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/base/Log.kt

@@ -0,0 +1,20 @@
+package com.kdanmobile.android.lib.material.tokens.base
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description:
+ */
+object Log {
+
+
+    fun t(tag : String, msg : String){
+        println(tag +": ${msg}")
+    }
+
+}
+
+fun logT(tag: String, msg: String){
+    Log.t(tag, msg)
+}

+ 28 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/base/XMLUtil.kt

@@ -0,0 +1,28 @@
+package com.kdanmobile.android.lib.material.tokens.base
+
+import com.kdanmobile.android.lib.material.tokens.category.color.ColorXmlParserHandler
+import org.xml.sax.helpers.DefaultHandler
+import java.io.File
+import javax.xml.parsers.SAXParserFactory
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description:
+ */
+object XMLUtil {
+
+
+    /**
+     * 解析已存在的xml数据
+     */
+    fun getFileXmlData(file: File, defaultHandler: BaseXmlHandler): MutableMap<String, String> {
+        val factory = SAXParserFactory.newInstance()
+        val parser = factory.newSAXParser()
+        parser.parse(file, defaultHandler)
+        return defaultHandler.getExistsMapValues()
+    }
+
+
+}

+ 25 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/IParseToken.kt

@@ -0,0 +1,25 @@
+package com.kdanmobile.android.lib.material.tokens.category
+
+import org.json.JSONObject
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description: 解析token接口
+ */
+interface IParseToken {
+
+    /**
+     * 解析相关token数据
+     */
+    fun parse(rootKey : String, jsonObject: JSONObject)
+
+
+    /**
+     * 生成文件
+     */
+    fun generateTokenFile(destFilePath: String?)
+
+
+}

+ 50 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/ParseTokenFactory.kt

@@ -0,0 +1,50 @@
+package com.kdanmobile.android.lib.material.tokens.category
+
+import com.kdanmobile.android.lib.material.tokens.TokenCategory
+import com.kdanmobile.android.lib.material.tokens.category.color.ColorParse
+import com.kdanmobile.android.lib.material.tokens.category.sizeing.SizeingParse
+import com.kdanmobile.android.lib.material.tokens.category.spacing.SpacingParse
+import java.io.File
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description:
+ */
+object ParseTokenFactory {
+
+
+    fun factory(category: String) : IParseToken?{
+        return when(category){
+            TokenCategory.sizing.name ->{
+                //todo 此处待验证,保存的值还没有加单位,应该是px, 但需要具体项目再测一下
+                SizeingParse()
+            }
+            TokenCategory.spacing.name ->{
+                //todo 此处待验证,保存的值还没有加单位,应该是px, 但需要具体项目再测一下
+                SpacingParse()
+            }
+            TokenCategory.color.name ->{
+                ColorParse()
+            }
+            else -> null
+        }
+    }
+
+    fun getSavePathByCategory(destRootPath : String, category: String) : String?{
+        return when(category){
+            TokenCategory.sizing.name -> "values/token_sizing.xml"
+            TokenCategory.spacing.name -> "values/token_spacing.xml"
+            TokenCategory.color.name -> "values/token_colors.xml"
+            else -> ""
+        }.run {
+            if (isNullOrEmpty().not()){
+                File(destRootPath, this).absolutePath
+            }else{
+                null
+            }
+        }
+
+    }
+}

+ 65 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/color/ColorParse.kt

@@ -0,0 +1,65 @@
+package com.kdanmobile.android.lib.material.tokens.category.color
+
+import com.kdanmobile.android.lib.material.tokens.base.FileUtil
+import com.kdanmobile.android.lib.material.tokens.base.Log
+import com.kdanmobile.android.lib.material.tokens.base.XMLUtil
+import com.kdanmobile.android.lib.material.tokens.base.logT
+import com.kdanmobile.android.lib.material.tokens.category.IParseToken
+import org.json.JSONObject
+import java.io.File
+import javax.xml.parsers.SAXParserFactory
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description: 解析Sizing相关token
+ */
+class ColorParse : IParseToken {
+
+    private var result = hashMapOf<String, String>()
+
+    private var tag = "解析Color"
+
+
+    override fun parse(rootKey: String, jsonObject: JSONObject) {
+        println("开始解析${rootKey}类型Tokens")
+        for (itemKey in jsonObject.keys()) {
+            val key = itemKey as String
+            val value = jsonObject.get(key)
+            val names = (value as JSONObject).names()
+            if (names.length() == 2 && names.getString(0).equals("type") || names.getString(0).equals("value")) {
+                val sizingValue = value.getString("value")
+                result["${rootKey}_${key}"] = sizingValue
+            } else {
+                parse("${rootKey}_$key", value)
+            }
+        }
+    }
+
+
+    /**
+     * 生成token文件
+     */
+    override fun generateTokenFile(destFilePath: String?) {
+
+        if (destFilePath.isNullOrEmpty()){
+            logT(tag, "保存路径为空---return")
+            return
+        }
+        logT(tag, "开始生成Sizing Token文件")
+        Log.t(tag, "token文件输出路径:${destFilePath}")
+
+        val file = File(destFilePath)
+        val outputList = FileUtil.parseAndMergeOldData(tag, file, ColorXmlParserHandler(), result)
+        FileUtil.writeTokens(file, "color", outputList)
+
+        logT(tag, "解析生成文件完成-----")
+
+    }
+
+
+
+
+}
+

+ 45 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/color/ColorXmlParserHandler.kt

@@ -0,0 +1,45 @@
+package com.kdanmobile.android.lib.material.tokens.category.color
+
+import com.kdanmobile.android.lib.material.tokens.base.BaseXmlHandler
+import org.xml.sax.Attributes
+import org.xml.sax.helpers.DefaultHandler
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description: Sizing类型token 解析器,获取xml文件已经存在的 sizing数据
+ */
+class ColorXmlParserHandler : BaseXmlHandler() {
+
+    override fun startElement(uri: String?, localName: String?, qName: String?, attributes: Attributes?) {
+        super.startElement(uri, localName, qName, attributes)
+
+        if (qName.equals("color")) {
+            for (i in 0 until attributes!!.length) {
+                name = attributes?.getValue(i)
+            }
+        }
+
+    }
+
+    override fun endElement(uri: String?, localName: String?, qName: String?) {
+        super.endElement(uri, localName, qName)
+        try {
+            if (name.isNullOrEmpty().not() && value.isNullOrEmpty().not() && "\n".equals(value).not()) {
+                maps[name!!] = value!!
+            }
+        } catch (e: Exception) {
+            e.printStackTrace()
+        }
+
+    }
+
+
+    override fun characters(ch: CharArray, start: Int, length: Int) {
+        super.characters(ch, start, length)
+        value = String(ch, start, length)
+    }
+
+
+}

+ 66 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/sizeing/SizeingParse.kt

@@ -0,0 +1,66 @@
+package com.kdanmobile.android.lib.material.tokens.category.sizeing
+
+import com.kdanmobile.android.lib.material.tokens.base.FileUtil
+import com.kdanmobile.android.lib.material.tokens.base.Log
+import com.kdanmobile.android.lib.material.tokens.base.XMLUtil
+import com.kdanmobile.android.lib.material.tokens.base.logT
+import com.kdanmobile.android.lib.material.tokens.category.IParseToken
+import org.json.JSONObject
+import java.io.File
+import javax.xml.parsers.SAXParserFactory
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description: 解析Sizing相关token
+ */
+class SizeingParse : IParseToken {
+
+    private var result = hashMapOf<String, String>()
+
+    private var tag = "解析Sizing"
+
+
+    override fun parse(rootKey: String, jsonObject: JSONObject) {
+        println("开始解析${rootKey}类型Tokens")
+        for (itemKey in jsonObject.keys()) {
+            val key = itemKey as String
+            val value = jsonObject.get(key)
+            val names = (value as JSONObject).names()
+            if (names.length() == 2 && names.getString(0).equals("type") || names.getString(0).equals("value")) {
+                val sizingValue = value.getString("value")
+                result["${rootKey}_${key}"] = sizingValue
+            } else {
+                parse("${rootKey}_$key", value)
+            }
+        }
+
+
+    }
+
+
+    /**
+     * 生成token文件
+     */
+    override fun generateTokenFile(destFilePath: String?) {
+
+        if (destFilePath.isNullOrEmpty()){
+            logT(tag, "保存路径为空---return")
+            return
+        }
+
+        logT(tag, "开始生成Sizing Token文件")
+        Log.t(tag, "token文件输出路径:${destFilePath}")
+
+        val file = File(destFilePath)
+        val outputData = FileUtil.parseAndMergeOldData(tag, file, SizingXmlParserHandler(), result)
+        FileUtil.writeTokens(file, "integer", outputData)
+        logT(tag, "解析生成文件完成-----")
+
+    }
+
+
+
+}
+

+ 46 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/sizeing/SizingXmlParserHandler.kt

@@ -0,0 +1,46 @@
+package com.kdanmobile.android.lib.material.tokens.category.sizeing
+
+import com.kdanmobile.android.lib.material.tokens.base.BaseXmlHandler
+import org.xml.sax.Attributes
+import org.xml.sax.helpers.DefaultHandler
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description: Sizing类型token 解析器,获取xml文件已经存在的 sizing数据
+ */
+class SizingXmlParserHandler : BaseXmlHandler() {
+
+
+    override fun startElement(uri: String?, localName: String?, qName: String?, attributes: Attributes?) {
+        super.startElement(uri, localName, qName, attributes)
+
+        if (qName.equals("integer")) {
+            for (i in 0 until attributes!!.length) {
+                name = attributes?.getValue(i)
+            }
+        }
+
+    }
+
+    override fun endElement(uri: String?, localName: String?, qName: String?) {
+        super.endElement(uri, localName, qName)
+        try {
+            if (name.isNullOrEmpty().not() && value.isNullOrEmpty().not() && "\n".equals(value).not()) {
+                maps[name!!] = value!!
+            }
+        } catch (e: Exception) {
+            e.printStackTrace()
+        }
+
+    }
+
+
+    override fun characters(ch: CharArray, start: Int, length: Int) {
+        super.characters(ch, start, length)
+        value = String(ch, start, length)
+    }
+
+
+}

+ 65 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/spacing/SpacingParse.kt

@@ -0,0 +1,65 @@
+package com.kdanmobile.android.lib.material.tokens.category.spacing
+
+import com.kdanmobile.android.lib.material.tokens.base.FileUtil
+import com.kdanmobile.android.lib.material.tokens.base.Log
+import com.kdanmobile.android.lib.material.tokens.base.XMLUtil
+import com.kdanmobile.android.lib.material.tokens.base.logT
+import com.kdanmobile.android.lib.material.tokens.category.IParseToken
+import org.json.JSONObject
+import java.io.File
+import javax.xml.parsers.SAXParserFactory
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description: 解析Spacing相关token
+ */
+class SpacingParse : IParseToken {
+
+    private var result = hashMapOf<String, String>()
+
+    private var tag = "解析Spacing"
+
+
+    override fun parse(rootKey: String, jsonObject: JSONObject) {
+        println("开始解析${rootKey}类型Tokens")
+        for (itemKey in jsonObject.keys()) {
+            val key = itemKey as String
+            val value = jsonObject.get(key)
+            val names = (value as JSONObject).names()
+            if (names.length() == 2 && names.getString(0).equals("type") || names.getString(0).equals("value")) {
+                val sizingValue = value.getString("value")
+                result["${rootKey}_${key}"] = sizingValue
+            } else {
+                parse("${rootKey}_$key", value)
+            }
+        }
+
+
+    }
+
+
+    /**
+     * 生成token文件
+     */
+    override fun generateTokenFile(destFilePath: String?) {
+
+        if (destFilePath.isNullOrEmpty()) {
+            logT(tag, "保存路径为空---return")
+            return
+        }
+        logT(tag, "开始生成Sizing Token文件")
+        Log.t(tag, "token文件输出路径:${destFilePath}")
+
+        val file = File(destFilePath)
+        val resultData = FileUtil.parseAndMergeOldData(tag, file, SpacingXmlParserHandler(), result)
+        FileUtil.writeTokens(file, "integer", resultData)
+
+        logT(tag, "解析生成文件完成-----")
+
+    }
+
+
+}
+

+ 46 - 0
lib_material_tokens/src/main/java/com/kdanmobile/android/lib/material/tokens/category/spacing/SpacingXmlParserHandler.kt

@@ -0,0 +1,46 @@
+package com.kdanmobile.android.lib.material.tokens.category.spacing
+
+import com.kdanmobile.android.lib.material.tokens.base.BaseXmlHandler
+import org.xml.sax.Attributes
+import org.xml.sax.helpers.DefaultHandler
+
+/**
+ * @classname:
+ * @author: LiuXiaoLong
+ * @date: 2023/2/13
+ * description: Sizing类型token 解析器,获取xml文件已经存在的 sizing数据
+ */
+class SpacingXmlParserHandler : BaseXmlHandler() {
+
+
+    override fun startElement(uri: String?, localName: String?, qName: String?, attributes: Attributes?) {
+        super.startElement(uri, localName, qName, attributes)
+
+        if (qName.equals("integer")) {
+            for (i in 0 until attributes!!.length) {
+                name = attributes?.getValue(i)
+            }
+        }
+
+    }
+
+    override fun endElement(uri: String?, localName: String?, qName: String?) {
+        super.endElement(uri, localName, qName)
+        try {
+            if (name.isNullOrEmpty().not() && value.isNullOrEmpty().not() && "\n".equals(value).not()) {
+                maps[name!!] = value!!
+            }
+        } catch (e: Exception) {
+            e.printStackTrace()
+        }
+
+    }
+
+
+    override fun characters(ch: CharArray, start: Int, length: Int) {
+        super.characters(ch, start, length)
+        value = String(ch, start, length)
+    }
+
+
+}

+ 938 - 0
lib_material_tokens/src/tokens/alias-light.json

@@ -0,0 +1,938 @@
+{
+  "spacing": {
+    "base": {
+      "element": {
+        "0": {
+          "value": "{spacing.0}",
+          "type": "spacing"
+        },
+        "1": {
+          "value": "{spacing.1}",
+          "type": "spacing"
+        },
+        "2": {
+          "value": "{spacing.2}",
+          "type": "spacing"
+        },
+        "4": {
+          "value": "{spacing.4}",
+          "type": "spacing"
+        },
+        "6": {
+          "value": "{spacing.6}",
+          "type": "spacing"
+        },
+        "8": {
+          "value": "{spacing.8}",
+          "type": "spacing"
+        },
+        "12": {
+          "value": "{spacing.12}",
+          "type": "spacing"
+        },
+        "16": {
+          "value": "{spacing.16}",
+          "type": "spacing"
+        },
+        "24": {
+          "value": "{spacing.24}",
+          "type": "spacing"
+        }
+      },
+      "module": {
+        "24": {
+          "value": "{spacing.24}",
+          "type": "spacing"
+        },
+        "32": {
+          "value": "{spacing.32}",
+          "type": "spacing"
+        }
+      }
+    },
+    "tree": {
+      "32": {
+        "value": "{spacing.32}",
+        "type": "spacing"
+      },
+      "40": {
+        "value": "{spacing.40}",
+        "type": "spacing"
+      },
+      "56": {
+        "value": "{spacing.56}",
+        "type": "spacing"
+      },
+      "64": {
+        "value": "{spacing.64}",
+        "type": "spacing"
+      },
+      "80": {
+        "value": "{spacing.80}",
+        "type": "spacing"
+      },
+      "88": {
+        "value": "{spacing.88}",
+        "type": "spacing"
+      }
+    }
+  },
+  "color": {
+    "btn": {
+      "cta": {
+        "bg": {
+          "norm": {
+            "value": "{color.light.blue.6}",
+            "type": "color"
+          },
+          "hov": {
+            "value": "{color.light.blue.5}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.light.blue.7}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.blue.2}",
+            "type": "color"
+          }
+        },
+        "text": {
+          "def": {
+            "value": "{color.sys.text.anti.norm}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.sys.text.anti.dis}",
+            "type": "color"
+          }
+        }
+      },
+      "brand": {
+        "bg": {
+          "norm": {
+            "value": "{color.light.navy-blue.6}",
+            "type": "color"
+          },
+          "hov": {
+            "value": "{color.light.navy-blue.5}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.light.navy-blue.7}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.navy-blue.3}",
+            "type": "color"
+          }
+        },
+        "text": {
+          "def": {
+            "value": "{color.sys.text.anti.norm}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.sys.text.anti.dis}",
+            "type": "color"
+          }
+        }
+      },
+      "sec": {
+        "border-color": {
+          "value": "{color.light.gray.4}",
+          "type": "color"
+        },
+        "bg": {
+          "norm": {
+            "value": "{color.light.gray.1}",
+            "type": "color"
+          },
+          "hov": {
+            "value": "{color.light.gray.3}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.light.gray.4}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.gray.3}",
+            "type": "color"
+          }
+        },
+        "text": {
+          "def": {
+            "value": "{color.sys.text.neutral.lv1}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.sys.text.neutral.dis}",
+            "type": "color"
+          }
+        }
+      },
+      "icon-fill": {
+        "bg": {
+          "norm": {
+            "value": "{color.light.gray.3}",
+            "type": "color"
+          },
+          "hov": {
+            "value": "{color.light.gray.4}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.light.gray.5}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.gray.3}",
+            "type": "color"
+          }
+        }
+      },
+      "ghost": {
+        "border": {
+          "norm": {
+            "value": "{color.light.navy-blue.6}",
+            "type": "color"
+          },
+          "hov": {
+            "value": "{color.light.navy-blue.5}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.light.navy-blue.7}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.navy-blue.3}",
+            "type": "color"
+          }
+        },
+        "text": {
+          "norm": {
+            "value": "{color.sys.text.brand.norm}",
+            "type": "color"
+          },
+          "hov": {
+            "value": "{color.sys.text.brand.hov}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.sys.text.brand.act}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.sys.text.brand.dis}",
+            "type": "color"
+          }
+        }
+      },
+      "link": {
+        "text": {
+          "norm": {
+            "value": "{color.sys.text.accent.norm}",
+            "type": "color"
+          },
+          "hov": {
+            "value": "{color.sys.text.accent.hov}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.sys.text.accent.act}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.sys.text.accent.dis}",
+            "type": "color"
+          }
+        }
+      },
+      "upgrade": {
+        "bg": {
+          "norm": {
+            "value": "{color.light.orange.6}",
+            "type": "color"
+          },
+          "hov": {
+            "value": "{color.light.orange.5}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.light.orange.7}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.orange.3}",
+            "type": "color"
+          }
+        },
+        "text": {
+          "def": {
+            "value": "{color.sys.text.anti.norm}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.sys.text.anti.dis}",
+            "type": "color"
+          }
+        }
+      }
+    },
+    "sys": {
+      "text": {
+        "anti": {
+          "norm": {
+            "value": "{color.light.gray.1}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.gray.2}",
+            "type": "color"
+          }
+        },
+        "accent": {
+          "norm": {
+            "value": "{color.light.blue.6}",
+            "type": "color"
+          },
+          "hov": {
+            "value": "{color.light.blue.5}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.light.blue.7}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.blue.3}",
+            "type": "color"
+          }
+        },
+        "neutral": {
+          "lv1": {
+            "value": "{color.light.gray.11}",
+            "type": "color"
+          },
+          "lv2": {
+            "value": "{color.light.gray.9}",
+            "type": "color"
+          },
+          "lv3": {
+            "value": "{color.light.gray.7}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.gray.6}",
+            "type": "color"
+          }
+        },
+        "brand": {
+          "norm": {
+            "value": "{color.light.navy-blue.6}",
+            "type": "color"
+          },
+          "hov": {
+            "value": "{color.light.navy-blue.5}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.light.navy-blue.7}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.navy-blue.3}",
+            "type": "color"
+          }
+        },
+        "error": {
+          "norm": {
+            "value": "{color.light.red.6}",
+            "type": "color"
+          }
+        }
+      },
+      "border": {
+        "error": {
+          "value": "{color.light.red.6}",
+          "type": "color"
+        },
+        "neutral": {
+          "lv1": {
+            "value": "{color.light.gray.5}",
+            "type": "color"
+          },
+          "lv2": {
+            "value": "{color.light.gray.4}",
+            "type": "color"
+          },
+          "lv3": {
+            "value": "{color.light.gray.3}",
+            "type": "color"
+          }
+        },
+        "accent": {
+          "lv1": {
+            "value": "{color.light.blue.6}",
+            "type": "color"
+          },
+          "lv2": {
+            "value": "{color.light.blue.4}",
+            "type": "color"
+          }
+        }
+      },
+      "layout": {
+        "bg": {
+          "home": {
+            "value": "{color.light.gray.1}",
+            "type": "color"
+          },
+          "view": {
+            "value": "{color.light.gray.5}",
+            "type": "color"
+          },
+          "tabbar": {
+            "value": "{color.light.gray.4}",
+            "type": "color"
+          }
+        },
+        "mg": {
+          "value": "{color.light.gray.2}",
+          "type": "color"
+        },
+        "fg": {
+          "light": {
+            "value": "{color.light.gray.1}",
+            "type": "color"
+          },
+          "light-dis": {
+            "value": "{color.light.gray.3}",
+            "type": "color"
+          },
+          "dark": {
+            "value": "{color.light.gray.4}",
+            "type": "color"
+          }
+        },
+        "dark": {
+          "bg": {
+            "value": "{color.light.gray.10}",
+            "type": "color"
+          }
+        },
+        "state": {
+          "note": {
+            "value": "{color.light.blue.1}",
+            "type": "color"
+          },
+          "info": {
+            "value": "{color.light.blue.2}",
+            "type": "color"
+          },
+          "error": {
+            "value": "{color.light.red.2}",
+            "type": "color"
+          },
+          "warning": {
+            "value": "{color.light.gold.2}",
+            "type": "color"
+          }
+        },
+        "anti": {
+          "value": "{color.light.gray.1}",
+          "type": "color"
+        },
+        "accent": {
+          "value": "{color.light.blue.6}",
+          "type": "color"
+        },
+        "brand": {
+          "value": "{color.light.navy-blue.6}",
+          "type": "color"
+        },
+        "divider": {
+          "value": "rgba({color.light.gray.12}, 0.1)",
+          "type": "color"
+        }
+      }
+    },
+    "item-state": {
+      "sel": {
+        "bg": {
+          "lv1": {
+            "value": "rgba({color.light.blue.6},0.1)",
+            "type": "color"
+          },
+          "lv2": {
+            "value": "{color.light.gray.4}",
+            "type": "color"
+          },
+          "lv3": {
+            "value": "rgba({color.light.gray.5}, 0.6)",
+            "type": "color"
+          }
+        },
+        "border": {
+          "lv3": {
+            "value": "{color.sys.border.neutral.lv1}",
+            "type": "color"
+          }
+        }
+      },
+      "hov": {
+        "bg": {
+          "value": "{color.light.gray.3}",
+          "type": "color"
+        }
+      }
+    },
+    "field": {
+      "border": {
+        "norm": {
+          "value": "{color.sys.border.neutral.lv2}",
+          "type": "color"
+        },
+        "hov": {
+          "value": "{color.sys.border.accent.lv2}",
+          "type": "color"
+        },
+        "focus": {
+          "value": "{color.sys.border.accent.lv1}",
+          "type": "color"
+        },
+        "dis": {
+          "value": "{color.sys.border.neutral.lv2}",
+          "type": "color"
+        },
+        "error": {
+          "value": "{color.sys.border.error}",
+          "type": "color"
+        },
+        "sel": {
+          "value": "{color.light.blue.3}",
+          "type": "color"
+        }
+      },
+      "bg": {
+        "def": {
+          "value": "{color.sys.layout.fg.light}",
+          "type": "color"
+        },
+        "dis": {
+          "value": "{color.sys.layout.fg.light-dis}",
+          "type": "color"
+        }
+      },
+      "bg-text": {
+        "sel": {
+          "value": "{color.light.blue.3}",
+          "type": "color"
+        }
+      },
+      "text": {
+        "act": {
+          "value": "{color.sys.text.neutral.lv1}",
+          "type": "color"
+        },
+        "placeholder": {
+          "value": "{color.sys.text.neutral.lv3}",
+          "type": "color"
+        },
+        "dis": {
+          "value": "{color.sys.text.neutral.dis}",
+          "type": "color"
+        },
+        "tips": {
+          "value": "{color.sys.text.neutral.lv3}",
+          "type": "color"
+        },
+        "tips-error": {
+          "value": "{color.sys.text.error.norm}",
+          "type": "color"
+        }
+      }
+    },
+    "slider": {
+      "track": {
+        "norm": {
+          "value": "{color.light.gray.5}",
+          "type": "color"
+        },
+        "dis": {
+          "value": "{color.light.gray.4}",
+          "type": "color"
+        }
+      },
+      "track-filled": {
+        "norm": {
+          "value": "{color.light.blue.6}",
+          "type": "color"
+        },
+        "dis": {
+          "value": "{color.light.gray.6}",
+          "type": "color"
+        }
+      },
+      "knob": {
+        "norm": {
+          "value": "{color.light.blue.6}",
+          "type": "color"
+        },
+        "dis": {
+          "value": "{color.light.gray.6}",
+          "type": "color"
+        },
+        "border": {
+          "value": "{color.light.gray.1}",
+          "type": "color"
+        }
+      }
+    },
+    "icon": {
+      "base": {
+        "neutral": {
+          "norm": {
+            "lv1": {
+              "value": "{color.light.gray.9}",
+              "type": "color"
+            },
+            "lv2": {
+              "value": "{color.light.gray.7}",
+              "type": "color"
+            },
+            "lv3": {
+              "value": "{color.light.gray.5}",
+              "type": "color"
+            }
+          },
+          "sel": {
+            "value": "{color.light.gray.11}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.gray.6}",
+            "type": "color"
+          }
+        },
+        "brand": {
+          "value": "{color.light.navy-blue.6}",
+          "type": "color"
+        },
+        "accent": {
+          "value": "{color.light.blue.6}",
+          "type": "color"
+        },
+        "state": {
+          "info": {
+            "value": "{color.light.blue.6}",
+            "type": "color"
+          },
+          "success": {
+            "value": "{color.light.green.6}",
+            "type": "color"
+          },
+          "warning": {
+            "value": "{color.light.gold.6}",
+            "type": "color"
+          },
+          "error": {
+            "value": "{color.light.red.6}",
+            "type": "color"
+          }
+        },
+        "anti": {
+          "norm": {
+            "value": "{color.light.gray.1}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.gray.2}",
+            "type": "color"
+          }
+        }
+      },
+      "pdf-tools": {
+        "pink": {
+          "value": "{color.light.pink.5}",
+          "type": "color"
+        },
+        "cyan": {
+          "value": "{color.light.cyan.5}",
+          "type": "color"
+        },
+        "blue": {
+          "value": "{color.light.blue.5}",
+          "type": "color"
+        },
+        "purple": {
+          "value": "{color.light.purple.5}",
+          "type": "color"
+        },
+        "orange": {
+          "value": "{color.light.orange.5}",
+          "type": "color"
+        }
+      },
+      "checkbox-radio": {
+        "norm": {
+          "bg": {
+            "value": "{color.sys.layout.fg.light}",
+            "type": "color"
+          },
+          "border": {
+            "value": "{color.sys.border.neutral.lv2}",
+            "type": "color"
+          }
+        },
+        "hov": {
+          "bg": {
+            "value": "{color.sys.layout.fg.light}",
+            "type": "color"
+          },
+          "border": {
+            "value": "{color.sys.border.accent.lv2}",
+            "type": "color"
+          }
+        },
+        "dis": {
+          "bg": {
+            "value": "{color.sys.layout.fg.light-dis}",
+            "type": "color"
+          },
+          "border": {
+            "value": "{color.sys.border.neutral.lv2}",
+            "type": "color"
+          },
+          "fill": {
+            "value": "{color.icon.base.neutral.dis}",
+            "type": "color"
+          }
+        },
+        "sel": {
+          "bg": {
+            "value": "{color.sys.layout.accent}",
+            "type": "color"
+          },
+          "fill": {
+            "value": "{color.icon.base.anti.norm}",
+            "type": "color"
+          },
+          "border-radio": {
+            "value": "{color.sys.border.accent.lv1}",
+            "type": "color"
+          }
+        }
+      },
+      "file": {
+        "pdf": {
+          "value": "{color.light.red.6}",
+          "type": "color"
+        },
+        "image": {
+          "value": "{color.light.navy-blue.4}",
+          "type": "color"
+        }
+      },
+      "arrow": {
+        "gray": {
+          "def": {
+            "value": "{color.light.gray.7}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.light.gray.8}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.icon.base.neutral.dis}",
+            "type": "color"
+          }
+        },
+        "anti": {
+          "def": {
+            "value": "{color.icon.base.anti.norm}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.icon.base.anti.dis}",
+            "type": "color"
+          }
+        },
+        "accent": {
+          "norm": {
+            "value": "{color.icon.base.accent}",
+            "type": "color"
+          },
+          "hov": {
+            "value": "{color.light.blue.5}",
+            "type": "color"
+          },
+          "act": {
+            "value": "{color.light.blue.7}",
+            "type": "color"
+          },
+          "dis": {
+            "value": "{color.light.blue.3}",
+            "type": "color"
+          }
+        }
+      }
+    },
+    "badge": {
+      "red": {
+        "bg": {
+          "value": "{color.light.red.6}",
+          "type": "color"
+        }
+      }
+    }
+  },
+  "radius": {
+    "base": {
+      "s": {
+        "value": "{border-radius.2}",
+        "type": "borderRadius"
+      },
+      "m": {
+        "value": "{border-radius.4}",
+        "type": "borderRadius"
+      },
+      "l": {
+        "value": "{border-radius.8}",
+        "type": "borderRadius"
+      }
+    },
+    "fullround-btn": {
+      "xs": {
+        "value": "{border-radius.10}",
+        "type": "borderRadius"
+      },
+      "s": {
+        "value": "{border-radius.12}",
+        "type": "borderRadius"
+      },
+      "m": {
+        "value": "{border-radius.16}",
+        "type": "borderRadius"
+      },
+      "l": {
+        "value": "{border-radius.20}",
+        "type": "borderRadius"
+      }
+    }
+  },
+  "text": {
+    "mac": {
+      "footnote": {
+        "value": "{text-mac.regular.11}",
+        "type": "typography"
+      },
+      "body": {
+        "s": {
+          "value": "{text-mac.regular.12}",
+          "type": "typography"
+        },
+        "m-base": {
+          "value": "{text-mac.regular.14}",
+          "type": "typography"
+        },
+        "l": {
+          "value": "{text-mac.regular.16}",
+          "type": "typography"
+        }
+      },
+      "title": {
+        "s": {
+          "value": "{text-mac.semibold.12}",
+          "type": "typography"
+        },
+        "m-base": {
+          "value": "{text-mac.semibold.14}",
+          "type": "typography"
+        },
+        "l": {
+          "value": "{text-mac.semibold.16}",
+          "type": "typography"
+        },
+        "xl": {
+          "value": "{text-mac.semibold.20}",
+          "type": "typography"
+        }
+      }
+    },
+    "win": {
+      "footnote": {
+        "value": "{text-windows.regular.11}",
+        "type": "typography"
+      },
+      "body": {
+        "s": {
+          "value": "{text-windows.regular.12}",
+          "type": "typography"
+        },
+        "m-base": {
+          "value": "{text-windows.regular.14}",
+          "type": "typography"
+        },
+        "l": {
+          "value": "{text-windows.regular.16}",
+          "type": "typography"
+        }
+      },
+      "title": {
+        "s": {
+          "value": "{text-windows.semibold.12}",
+          "type": "typography"
+        },
+        "m-base": {
+          "value": "{text-windows.semibold.14}",
+          "type": "typography"
+        },
+        "l": {
+          "value": "{text-windows.semibold.16}",
+          "type": "typography"
+        },
+        "xl": {
+          "value": "{text-windows.semibold.20}",
+          "type": "typography"
+        }
+      }
+    }
+  },
+  "shadow": {
+    "neutral": {
+      "s": {
+        "value": "{shadow.black-2-2}",
+        "type": "boxShadow"
+      },
+      "m": {
+        "value": "{shadow.black-2-8}",
+        "type": "boxShadow"
+      },
+      "l": {
+        "value": "{shadow.black-4-16}",
+        "type": "boxShadow"
+      },
+      "xl": {
+        "value": "{shadow.black-16-48}",
+        "type": "boxShadow"
+      }
+    },
+    "accent": {
+      "s": {
+        "value": "{shadow.blue-0-4}",
+        "type": "boxShadow"
+      }
+    },
+    "error": {
+      "s": {
+        "value": "{shadow.red-0-4}",
+        "type": "boxShadow"
+      }
+    }
+  }
+}

File diff suppressed because it is too large
+ 5445 - 0
lib_material_tokens/src/tokens/comp-light.json


File diff suppressed because it is too large
+ 1389 - 0
lib_material_tokens/src/tokens/global.json


+ 1 - 1
settings.gradle

@@ -35,4 +35,4 @@ include ':lib_ad_csj'
 include ':lib_ad_gromore'
 include ':lib_pdf_base'
 include ':lib_ad_applovinmax'
-include ':lib_material_design_tokens'
+include ':lib_material_tokens'