-
Notifications
You must be signed in to change notification settings - Fork 0
/
pushLocal.gradle
35 lines (33 loc) · 1.16 KB
/
pushLocal.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
apply plugin: "maven-publish"
task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "shared"
}
project.afterEvaluate {
publishToMavenLocal {
def groupId = LIBRARY_GROUP
def artifactId = LIBRARY_ARTIFACT_ID
def versionName = LIBRARY_VERSION_NAME + "-local"
def debugSuffix = "-debug"
def releaseSuffix = "-release"
publishing {
publications {
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release
// You can then customize attributes of the publication as shown below.
groupId = 'com.example.MyLibrary'
artifactId = 'final'
version = '1.0'
}
debug(MavenPublication) {
// Applies the component for the debug build variant.
from components.debug
groupId = 'com.example.MyLibrary'
artifactId = 'final-debug'
version = '1.0'
}
}
}
}
}