-
Notifications
You must be signed in to change notification settings - Fork 0
/
bintray.gradle
85 lines (78 loc) · 2.63 KB
/
bintray.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
80
81
82
83
84
85
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
project.ext {
mavenGroupId = 'com.gorisse.thomas.sceneform'
mavenVersion = '1.18.5'
mavenDesc = 'Sceneform Core'
mavenWebsiteUrl = 'https://github.com/thomasgorisse/sceneform-android-sdk'
mavenIssueTrackerUrl = 'https://github.com/thomasgorisse/sceneform-android-sdk/issues'
mavenVCSUrl = 'https://github.com/thomasgorisse/sceneform-android-sdk.git'
mavenLicenses = ['Apache-2.0']
mavenLabels = ['android', 'sceneform', 'arcore', 'filament']
mavenGithubRepo = 'thomasgorisse/sceneform-android-sdk'
mavenGithubReleaseNotesFile = 'README.md'
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "sources"
exclude '**/BuildConfig.java'
exclude '**/R.java'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
destinationDir = file("../docs/javadoc/")
failOnError false
exclude '**/BuildConfig.java'
exclude '**/R.java'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
from javadoc.destinationDir
}
Properties properties = new Properties()
try {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
} catch (Exception e) {
println "Can not find local.properties file"
}
afterEvaluate {
generateReleaseBuildConfig.enabled = false
publishing {
publications {
releasePublication(MavenPublication) {
from components.release
groupId = project.mavenGroupId
artifactId = project.name
version = project.mavenVersion
artifact(sourcesJar)
artifact(javadocJar)
}
}
}
}
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
publications = ['releasePublication']
pkg {
repo = "maven"
name = "$project.mavenGroupId:$project.name"
desc = project.mavenDesc
websiteUrl = project.mavenWebsiteUrl
issueTrackerUrl = project.mavenIssueTrackerUrl
vcsUrl = project.mavenVCSUrl
licenses = project.mavenLicenses
labels = project.mavenLabels
publicDownloadNumbers = true
publish = true
dryRun = false
githubRepo = project.mavenGithubRepo
githubReleaseNotesFile = project.mavenGithubReleaseNotesFile
version {
name = project.mavenVersion
vcsTag = project.mavenVersion
released = new Date()
}
}
}