-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
122 lines (107 loc) · 2.93 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
/*
This script expects you to have YUI3 expanded in "./yui"
*/
subprojects {
apply plugin:"java"
apply plugin:"maven"
apply plugin:"signing"
group="org.kohsuke.stapler"
version="3.4.1";
description="YUI3";
repositories {
mavenCentral()
}
signing {
sign configurations.archives
}
// dummy source/javadoc jars to make central happy
task emptySourceJar(type:Jar) {
classifier = "sources"
}
task emptyJavadocJar(type:Jar) {
classifier = "javadoc"
}
artifacts {
archives (emptySourceJar) {
classifier = "sources";
}
archives (emptyJavadocJar) {
classifier = "javadoc"
}
}
p = project
customizePom = {
pom {
artifactId = "yui3-${p.name}"
name = "YUI3 ${p.name}"
project {
description = p.description
url = "http://kohsuke.org/";
licenses {
license {
name = "BSD License"
url = "http://yuilibrary.com/license/"
}
}
developers {
developer {
id = "kohsuke"
}
}
scm {
// url = "http://github.com/kohsuke/package-renamed-asm";
}
}
}
}
install.repositories.mavenInstaller(customizePom)
uploadArchives.repositories.mavenDeployer(customizePom)
uploadArchives.repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signPom(deployment) }
repository(url: "http://maven.jenkins-ci.org:8081/content/repositories/releases/", id:"maven.jenkins-ci.org") {
authentication(userName:"kohsuke", password:System.getProperty("password"))
}
}
}
// list up *.js that has corresponding "*-min.js"
def regularJs = [] as Set
def yuiDir = new File("yui/build")
yuiDir.eachFileRecurse { f ->
if (f.name.endsWith(".js")) {
g = new File(f.path[0..-4]+"-min.js")
if (g.exists())
regularJs << f.path.substring(yuiDir.path.length()+1)
}
}
def yuiProject(name,dep,config) {
project(name) {
jar {
from("../yui/build",config)
into "yui3/"
includeEmptyDirs = false
}
dep.each { d ->
dependsOn ":${d}"
dependencies {
compile "${group}:yui3-${d}:${version}"
}
}
}
}
// minified js and other base assets
yuiProject(":base",[]) {
include "**/*";
exclude "**/*-debug.js";
exclude "**/skins/";
exclude regularJs;
}
// debug version of scripts
yuiProject(":debug",["base"]) {
include "**/*-debug.js";
}
yuiProject(":skin-sam",["base"]) {
include "**/skins/sam/";
}
yuiProject(":skin-night",["base"]) {
include "**/skins/night/";
}