This repository has been archived by the owner on Dec 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
179 lines (148 loc) · 3.36 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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
group = "com.github.samystudio.flair"
version = "0.8.2"
description = "Flair is a gradle plugin that helps you build Adobe AIR mobile/desktop projects with Starling and Feathers libraries. Flair also comes up with its own actionscript library to manage your app resources, it actually mimics android resources managment."
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.5"
classpath "com.gradle.publish:plugin-publish-plugin:0.9.2"
}
}
apply plugin: "groovy"
apply plugin: "maven"
apply plugin: "maven-publish"
apply plugin: "com.jfrog.bintray"
apply plugin: "com.gradle.plugin-publish"
ext {
bintrayRepo = "maven"
bintrayName = project.name
publishedGroupId = group
libraryName = "Flair Gradle Plugin"
artifact = project.name
libraryDescription = description
libraryVersion = version
siteUrl = "https://github.com/SamYStudiO/flair-gradle-plugin"
gitUrl = "https://github.com/SamYStudiO/flair-gradle-plugin.git"
developerId = "samystudio"
developerName = "Samuel Eminet"
developerEmail = "[email protected]"
licenseName = "BSD Simplified"
licenseUrl = "http:https://opensource.org/licenses/BSD-2-Clause"
allLicenses = [ "BSD Simplified" ]
}
sourceSets {
main {
resources {
exclude "**/scaffold.iml"
}
}
}
repositories {
mavenCentral( )
mavenLocal( )
}
dependencies {
compile gradleApi( )
compile localGroovy( )
testCompile gradleTestKit( )
testCompile "org.spockframework:spock-core:1.0-groovy-2.4" , {
exclude group: "org.codehaus.groovy"
}
}
task sourcesJar( type: Jar ) {
classifier = "sources"
from sourceSets.main.allSource
}
task javadocJar( type: Jar , dependsOn: javadoc ) {
classifier = "javadoc"
from javadoc.getDestinationDir( )
}
artifacts {
archives javadocJar
archives sourcesJar
}
publishing {
publications {
flair( MavenPublication ) {
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
}
}
}
install {
repositories.mavenInstaller {
pom {
project {
packaging "aar"
groupId publishedGroupId
artifactId artifact
// Add your description here
name libraryName
description libraryDescription
url siteUrl
// Set your license
licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
Properties properties = new Properties( )
File f = project.rootProject.file( "local.properties" )
if( f.exists( ) )
{
properties.load( f.newDataInputStream( ) )
bintray {
user = properties.getProperty( "bintray.user" )
key = properties.getProperty( "bintray.apikey" )
configurations = [ "archives" ]
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true
publicDownloadNumbers = true
}
}
}
pluginBundle {
website = siteUrl
vcsUrl = gitUrl
description = libraryDescription
tags = [ "adobe" , "air" , "starling" , "feathers" ]
plugins {
flairPlugin {
id = publishedGroupId
displayName = libraryName
description = libraryDescription
}
}
}