-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathbuild.gradle
More file actions
156 lines (132 loc) · 3.62 KB
/
build.gradle
File metadata and controls
156 lines (132 loc) · 3.62 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
buildscript {
ext.kotlin_version = '1.2.10'
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// classpath 'com.novoda:bintray-release:0.8.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
}
}
version '1.1.0'
group 'com.adison.gradleplugin'
apply plugin: 'kotlin'
apply plugin: 'maven'
//apply plugin: 'com.novoda.bintray-release'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
compile gradleApi()
compile 'com.android.tools.build:gradle:3.0.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'file:repo/')
}
}
}
//publish {
// userOrg = 'adisonhyh'
// groupId = 'com.adison.gradleplugin'
// artifactId = 'jar'
// publishVersion = '1.0.3'
// desc = 'jar'
// website = 'https://github.com/adisonhyh/buildJar'
//}
def projectName = "GradlePluginForJar"
def mavenDesc = 'buildjar'
def baseUrl = 'https://github.com/adisonhyh'
def siteUrl = baseUrl
def gitUrl = "${baseUrl}/buildJar.git"
def issueUrl = "${baseUrl}/buildJar/issues"
def licenseIds = ['Apache-2.0']
def licenseNames = ['The Apache Software License, Version 2.0']
def licenseUrls = ['http://www.apache.org/licenses/LICENSE-2.0.txt']
def inception = '2016'
def username = 'adison'
install {
repositories {
mavenInstaller {
pom.project {
// Description
name projectName
description mavenDesc
url siteUrl
// Archive
groupId project.group
artifactId 'jar'
version project.version
// License
inceptionYear inception
licenses {
licenseNames.eachWithIndex { ln, li ->
license {
name ln
url licenseUrls[li]
}
}
}
developers {
developer {
name username
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = 'javadoc'
}
artifacts {
archives javadocJar
archives sourcesJar
}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("BINTRAY_USER")
key = properties.getProperty("BINTRAY_KEY")
configurations = ['archives']
pkg {
repo = 'maven'
name = projectName
desc = mavenDesc
websiteUrl = siteUrl
issueTrackerUrl = issueUrl
vcsUrl = gitUrl
labels = ['gradle', 'plugin', 'jar']
licenses = licenseIds
publish = true
publicDownloadNumbers = true
}
}