Skip to content

Commit 3bcd24e

Browse files
committed
update demo
1 parent 0dd3d0a commit 3bcd24e

File tree

7 files changed

+21
-2
lines changed

7 files changed

+21
-2
lines changed

PluginBase/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ dependencies {
2424

2525
build.doLast {
2626

27+
exportJar.execute()
28+
2729
//将编译好的插件apk复制到Main工程的assets目录下, 便于测试
2830
copy {
2931
println 'copy plugin apk to assets... ' + buildDir.absolutePath + '/outputs/apk/PluginBase-debug.apk'
@@ -33,3 +35,8 @@ build.doLast {
3335
into(project(':PluginMain').getProjectDir().absolutePath + '/assets/')
3436
}
3537
}
38+
39+
task exportJar(type: Jar) {
40+
from buildDir.absolutePath + '/intermediates/classes/debug/'
41+
destinationDir = file(buildDir.absolutePath + '/outputs/')
42+
}

PluginBase/pluginbase.jar

-2.47 KB
Binary file not shown.

PluginCore/build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,15 @@ android {
4949
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
5050
}
5151
}
52+
}
53+
54+
build.doLast {
55+
56+
exportJar.execute()
57+
58+
}
59+
60+
task exportJar(type: Jar) {
61+
from buildDir.absolutePath + '/intermediates/classes/debug/'
62+
destinationDir = file(buildDir.absolutePath + '/outputs/')
5263
}

PluginMain/PluginMain-debug.apk

5.42 KB
Binary file not shown.
0 Bytes
Binary file not shown.
-9 Bytes
Binary file not shown.

PluginTest/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ dependencies {
7171
compile fileTree(dir: 'libs', include: ['*.jar'])
7272

7373
//依赖库的src
74-
provided files(project(':PluginCore').getBuildDir().absolutePath + '/intermediates/bundles/debug/classes.jar')
75-
provided files(project(':PluginBase').getProjectDir().absolutePath + '/pluginbase.jar')
74+
provided files(project(':PluginCore').getBuildDir().absolutePath + '/outputs/PluginCore.jar')
75+
provided files(project(':PluginBase').getBuildDir().absolutePath + '/outputs/PluginBase.jar')
76+
7677
//依赖库的R
7778
provided files(project(':PluginShareLib').getBuildDir().absolutePath + '/outputs/rClasses.jar')
7879
//依赖库的src

0 commit comments

Comments
 (0)