-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
executable file
·129 lines (113 loc) · 3.41 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
//classpath 'com.github.dcendents:android-maven-plugin:1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'com.jfrog.bintray'
group = 'me.isming'
archivesBaseName = 'firup'
version = '0.4.1'
sourceCompatibility = 1.6
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile gradleApi()
//groovy localGroovy()
compile 'org.json:json:20090211'
compile 'com.squareup.okhttp:okhttp:2.2.0'
compile 'commons-lang:commons-lang:2.6'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
runtime 'org.json:json:20090211'
runtime 'com.squareup.okhttp:okhttp:2.2.0'
}
task javadocJar(type: Jar, dependsOn: groovydoc) {
classifier = 'javadoc'
from "${buildDir}/javadoc"
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
// local upload
//uploadArchives {
// repositories {
// mavenDeployer {
// repository(url: 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath)
// }
// }
//}
//central upload
//if (gradle.startParameter.taskNames.contains("uploadArchives")) {
// apply from: 'build.publish.gradle'
//}
def siteUrl = 'https://github.com/sangmingming/gradle-fir-plugin' // 项目的主页
def gitUrl = 'https://github.com/sangmingming/gradle-fir-plugin.git' // Git仓库的url
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'jar'
// Add your description here
name 'Gradle Fir Plugin' //项目描述
url siteUrl
// Set your license
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'sangmingming' //填写开发者基本信息
name 'Sang Mingming'
email 'ming_1990@qq.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
Properties properties = new Properties()
properties.load(project.rootProject.file('gradle.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven" //发布到Bintray的那个仓库里,默认账户有四个库,我们这里上传到maven库
name = "firup" //发布到Bintray上的项目名字
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
}