-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle
140 lines (113 loc) · 4.48 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
subprojects {
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
testCompile 'junit:junit:4.12'
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
}
project(':fluent-hibernate-core') {
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
group = "com.github.v-ladynev"
version = "0.3.1"
description = "Library to work with Hibernate by fluent API"
archivesBaseName = "fluent-hibernate-core"
dependencies {
compile group: 'org.hibernate', name: 'hibernate-core', version: '5.1.0.Final'
//compile group: 'org.hibernate', name: 'hibernate-core', version: '4.3.6.Final'
testCompile 'com.h2database:h2:1.4.190'
testCompile 'org.assertj:assertj-core:1.7.1'
testCompile 'com.google.guava:guava:19.0'
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Fluent Hibernate Core'
packaging 'jar'
description "A library to work with Hibernate by fluent API. This library hasn't dependencies except Hibernate dependencies. It requires Java 1.6 and above."
url 'https://github.com/v-ladynev/fluent-hibernate'
scm {
connection 'scm:git:http://github.com/v-ladynev/fluent-hibernate'
developerConnection 'scm:git:https://github.com/v-ladynev/fluent-hibernate'
url 'http://github.com/v-ladynev/fluent-hibernate'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'v-ladynev'
name 'Vladimir Ladynev'
email '[email protected]'
}
developer {
id 'levvy'
name 'Lucas Levvy'
email '[email protected]'
}
}
}.writeTo("build/libs/" + archivesBaseName + "-" + version + ".pom")
}
}
}
}
project(':fluent-hibernate-examples').subprojects {
dependencies {
compile project(':fluent-hibernate-core')
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.37'
}
}
project(':fluent-hibernate-examples:simply-console') {
apply plugin: 'application'
apply plugin: 'eclipse'
group = "com.github.v-ladynev"
description = "A simply example console project using fluent-hibernate library with MySQL"
mainClassName = "com.github.fluent.hibernate.example.mysql.SimplyConsoleExample"
}
project(':fluent-hibernate-examples:spring-console') {
apply plugin: 'application'
apply plugin: 'eclipse'
group = "com.github.v-ladynev"
description = "An example console project using fluent-hibernate, Spring and MySQL"
mainClassName = "com.github.fluent.hibernate.example.spring.console.SpringConsoleExample"
dependencies {
compile group: 'org.springframework', name: 'spring-context', version: '4.2.2.RELEASE'
compile group: 'org.springframework', name: 'spring-orm', version: '4.2.2.RELEASE'
compile files('libs/ojdbc6_11.2.0.4.jar')
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.13'
}