/
build.gradle
79 lines (68 loc) · 2.13 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
77
78
79
import org.gradle.internal.jvm.Jvm
import permissions.dispatcher.AndroidJarDependencyPlugin
import permissions.dispatcher.AarToJarConversionPlugin
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: AndroidJarDependencyPlugin
apply plugin: AarToJarConversionPlugin
// Connect sources & tests to library project
convertAarsToJar.dependsOn ":library:assembleRelease"
task sourcesJar(type: Jar) {
from sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
compile "com.squareup:javapoet:$JAVAPOET_VERSION"
compile "com.squareup:kotlinpoet:$KOTLINPOET_VERSION"
compile project(path: ':annotation')
testCompile "junit:junit:$JUNIT_VERSION"
testCompile "com.google.testing.compile:compile-testing:$COMPILE_TESTING_VERSION"
testCompile "commons-io:commons-io:$COMMONS_IO_VERSION"
testCompile androidJar()
testCompile files(Jvm.current().getToolsJar())
testCompileAar "androidx.legacy:legacy-support-v4:$ANDROIDX_LIBRARY_VERSION"
testCompileAar project(path: ":library", configuration: "default")
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId GROUP_ID
artifactId ARTIFACT_ID_PROCESSOR
version VERSION
}
}
}
bintray {
publications = ['MyPublication']
user = bintrayUser
key = bintrayKey
dryRun = dryRun
publish = true
pkg {
repo = REPO
userOrg = USER
name = ARTIFACT_ID_PROCESSOR
vcsUrl = VCS_URL
licenses = LICENCES
version {
name = VERSION
desc = DESCRIPTION
}
}
}
// Non-Android project: Artifactory Plugin adds only 1 publication
project.ext.publicationName = "maven"
apply from: rootProject.file('gradle/gradle-artifactory-upload.gradle')