Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
X
xxsq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
xxsq
Commits
13ce1ad2
Commit
13ce1ad2
authored
Sep 13, 2022
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9ca3e44b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
build.gradle
app/build.gradle
+18
-1
version.properties
app/version.properties
+2
-2
build.gradle
build.gradle
+1
-1
No files found.
app/build.gradle
View file @
13ce1ad2
...
...
@@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'android-junk-code'
android
{
compileSdkVersion
rootProject
.
ext
.
compileSdkVersion
// 将版本相关的属性剥离到属性文件中
...
...
@@ -119,7 +120,23 @@ repositories {
}
}
android
.
applicationVariants
.
all
{
variant
->
switch
(
variant
.
name
)
{
//变体名称,如果没有设置 productFlavors 就是 buildType 名称,如果有设置 productFlavors 就是 flavor+buildType,例如(freeRelease、proRelease)
case
"oppoRelease"
:
androidJunkCode
.
configMap
.
put
(
variant
.
name
,
{
packageBase
=
"com.ym.plugin.ui"
//生成 java 类根包名
packageCount
=
30
//生成包数量
activityCountPerPackage
=
3
//每个包下生成 Activity 类数量
excludeActivityJavaFile
=
false
//是否排除生成 Activity 的 Java 文件,默认 false(layout 和写入 AndroidManifest.xml 还会执行),主要用于处理类似神策全埋点编译过慢问题
otherCountPerPackage
=
50
//每个包下生成其它类的数量
methodCountPerClass
=
20
//每个类下生成方法数量
resPrefix
=
"junk_"
//生成的 layout、drawable、string 等资源名前缀
drawableCount
=
300
//生成 drawable 资源数量
stringCount
=
300
//生成 string 数量
})
break
}
}
dependencies
{
implementation
project
(
':moduleMain'
)
...
...
app/version.properties
View file @
13ce1ad2
PACKAGE_NAME
=
com.zxhl.economize
VERSION_CODE
=
1
VERSION_NAME
=
1.0.0
\ No newline at end of file
VERSION_CODE
=
2
VERSION_NAME
=
1.0.1
\ No newline at end of file
build.gradle
View file @
13ce1ad2
...
...
@@ -9,7 +9,7 @@ buildscript {
classpath
"com.android.tools.build:gradle:4.0.1"
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath
'me.tatarka:gradle-retrolambda:3.7.0'
classpath
"com.github.qq549631030:android-junk-code:1.0.7"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment