-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathbuild.gradle
69 lines (59 loc) · 1.55 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
apply plugin: 'groovy'
apply plugin: 'maven-publish'
group = 'com.meituan.gradle'
version = '0.9.1'
description = 'A Gradle plugin to do AspectJ binary weaving in the way of Android class -> dex transform. It works as an augment for Android plugin'
repositories {
jcenter()
mavenLocal()
}
dependencies {
compile gradleApi()
compile localGroovy()
compile 'commons-io:commons-io:2.4'
compile 'com.android.tools.build:gradle:2.1.0'
compile 'org.aspectj:aspectjtools:1.8.9'
}
// publish
final boolean DEBUG = false;
task docJar(type: Jar, dependsOn: javadoc) {
from tasks.javadoc.destinationDir
classifier 'doc'
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier 'sources'
}
def isSnapshot() {
return version.endsWith("SNAPSHOT")
}
publishing {
repositories {
maven {
if (!DEBUG) {
if (isSnapshot()) {
url mavenSnapshotRepo
} else {
url mavenReleaseRepo
}
credentials {
username = mavenUsername
password = mavenPassword
}
} else {
url "${buildDir}/libs"
}
}
}
publications {
RoboAspectJ(MavenPublication) {
from components.java
artifactId = 'roboaspectj'
artifact docJar
artifact sourceJar
pom.withXml {
asNode().appendNode('description', '${description}')
}
}
}
}