forked from qq549631030/AndroidJunkCode
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.gradle
More file actions
70 lines (63 loc) · 2.41 KB
/
build.gradle
File metadata and controls
70 lines (63 loc) · 2.41 KB
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
apply plugin: 'groovy'
apply plugin: 'maven'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation gradleApi()
implementation localGroovy()
implementation 'com.squareup:javapoet:1.11.1'
implementation 'com.android.tools.build:gradle:3.0.0'
}
apply from: rootProject.projectDir.absolutePath + "/bintray-release.gradle"
// load properties
Properties properties = new Properties()
File localPropertiesFile = project.file("$rootProject.projectDir.absolutePath/local.properties");
if (localPropertiesFile.exists()) {
properties.load(localPropertiesFile.newDataInputStream())
}
File projectPropertiesFile = project.file("project.properties");
if (projectPropertiesFile.exists()) {
properties.load(projectPropertiesFile.newDataInputStream())
}
def projectName = properties.getProperty("project.name")
def projectGroupId = properties.getProperty("project.groupId")
def projectArtifactId = properties.getProperty("project.artifactId")
def projectArtifactVersion = properties.getProperty("project.artifactVersion")
def projectSiteUrl = properties.getProperty("project.siteUrl")
def projectGitUrl = properties.getProperty("project.gitUrl")
def projectDesc = properties.getProperty("project.desc")
def bintray_Org = properties.getProperty("bintray.org")
def bintray_User = properties.getProperty("bintray.user")
def bintrayApikey = properties.getProperty("bintray.apikey")
def mavenUserName = properties.getProperty("mavenUserName")
def mavenUserPassword = properties.getProperty("mavenUserPassword")
publish {
groupId = projectGroupId
artifactId = projectArtifactId
uploadName = projectName
website = projectSiteUrl
repository = projectGitUrl
desc = projectDesc
publishVersion = projectArtifactVersion
userOrg = bintray_Org
bintrayUser = bintray_User
bintrayKey = bintrayApikey
dryRun = false
}
uploadArchives {
repositories {
mavenDeployer {
// repository(url: 'your repositories') {
// authentication(userName: mavenUserName, password: mavenUserPassword)
// }
repository(url: uri("../repo"))
pom.version = projectArtifactVersion
pom.artifactId = 'android-junk-code'
pom.groupId = 'cn.hx.plugin'
pom.project {
name = project.name
packaging = 'jar'
description = 'description'
}
}
}
}