SkillAgentSearch skills...

StableId

Android 固定资源id,适配aapt,aapt2

Install / Use

/learn @lauhwong/StableId
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Stable-Id

固定android资源id,适配aapt和aapt2的资源编译模式。

使用

1.Maven仓库的SNAPSHOT版本,在buildscript中加入maven快照仓库,并加入classpath 依赖。

repositories {
        maven {
           url 'https://oss.sonatype.org/content/repositories/snapshots/'
        }
    }
dependencies {
        classpath 'com.github.lauhwong:stableid:1.0.3-SNAPSHOT'
    }

2.在application插件中引入stable-id插件。

apply plugin: 'com.miracles.stableid'

3.配置public.xml文件,定义固定资源id.可以在build.gradle中做一下的extension dsl配置。

stableXmlConfig{
   inXmlPath file("public.xml").absolutePath
}

或者,如果不配置该选项默认选择resDir/values/public.xml。

Related Skills

View on GitHub
GitHub Stars28
CategoryDevelopment
Updated9mo ago
Forks5

Languages

Groovy

Security Score

67/100

Audited on Jun 20, 2025

No findings