-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
76 lines (62 loc) · 1.97 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: "tb.gradle"
//apply from: "plugin.gradle"
//1.build.gradle文件内的插件*************
apply plugin: Plugin2
class Plugin2 implements Plugin<Project>{
@Override
void apply(Project target) {
println("this is a plugin in the file 'build.gradle'...")
}
}
buildscript {
ext.kotlin_version = '1.2.50'
repositories {
maven {
url uri('../pluginTest/tbPlugin')
}
maven {
url uri('./tbModulePlugin/')
}
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// classpath files('./jarPlugin-1.0.0.jar')
// classpath "com.tb.plugin:single.plugin:1.0.0"
classpath 'com.tb.plugin:module-plugin:1.0.0'
classpath 'com.tb.plugin:java-plugin:1.0.0'
classpath 'com.tb.plugin:kotlin-plugin:1.0.0'
}
}
//2.通过引用jar包的方式,jar包是其他工程生成的*************
//apply plugin: 'com.hello.plugin'
//3.其他工程引入的plugin*************
//apply plugin: 'com.hello.plugin'
//4.buildSrc下的插件
//此处插件id大小写,中下划线均可*************
apply plugin: 'com.tb.plugin-buildSrc'
//该方式可以不需要resources文件夹,直接引用插件全类名即可
//apply plugin: com.tb.plugin.TbPlugin
//5.工程内module的插件*************
apply plugin: 'com.tb.plugin.module'
//6.java plugin
apply plugin: 'com.tb.tb-plugin'
//7.kotlin plugin
apply plugin: 'com.tb.kplugin'
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
task(tianbin).doLast {
println "tianbin's test..."
}