Skip to content

Commit 952481e

Browse files
committed
Added gradle build support
1 parent e33c73a commit 952481e

File tree

10 files changed

+117
-14
lines changed

10 files changed

+117
-14
lines changed

Diff for: .gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ build
33
target
44

55
*.iml
6+
*.ipr
7+
*.iws
68
*.class
79

810
.idea
911
.classpath
1012
.project
1113
.gradle
14+
gradle/
15+
gradlew
16+
gradlew.bat
1217

1318
# Vim Backup/Swap Files
1419
*~

Diff for: build.gradle

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
allprojects {
2+
apply plugin: 'java'
3+
apply plugin: 'idea'
4+
5+
group = 'org.nanohttpd'
6+
version = '2.3.2-SNAPSHOT'
7+
}
8+
9+
subprojects {
10+
apply plugin: 'java'
11+
sourceCompatibility = 1.7
12+
targetCompatibility = 1.7
13+
14+
repositories {
15+
jcenter()
16+
}
17+
18+
dependencies {
19+
testCompile group: 'junit', name: 'junit', version: '4.12'
20+
}
21+
}
22+
23+
task wrapper(type: Wrapper) {
24+
gradleVersion = "4.4.1"
25+
}

Diff for: core/build.gradle

+6-14
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
apply plugin: 'java'
2-
3-
version = '2.1.0'
4-
5-
jar {
6-
baseName = 'nanohttpd'
7-
}
8-
9-
repositories {
10-
mavenCentral()
11-
}
1+
description = 'NanoHttpd-Core'
122

133
dependencies {
14-
testCompile group: 'junit', name: 'junit', version: '4.8.2'
15-
testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.2.5'
16-
testCompile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.2.5'
4+
testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.2.5'
5+
testCompile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.2.5'
176
}
187

8+
task wrapper(type: Wrapper) {
9+
gradleVersion = "4.4.1"
10+
}

Diff for: fileupload/build.gradle

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
description = 'NanoHttpd-apache file upload integration'
2+
3+
dependencies {
4+
compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.1'
5+
6+
compileOnly project(':nanohttpd')
7+
compileOnly group: 'javax.servlet', name: 'servlet-api', version: '2.5'
8+
9+
testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.4.1'
10+
testCompile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.4.1'
11+
}
12+
13+
task wrapper(type: Wrapper) {
14+
gradleVersion = "4.4.1"
15+
}

Diff for: markdown-plugin/build.gradle

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
description = 'NanoHttpd-Webserver-Markdown-Plugin'
2+
3+
dependencies {
4+
compile group: 'org.pegdown', name: 'pegdown', version: '1.4.1'
5+
compileOnly project(':nanohttpd')
6+
compileOnly project(':nanohttpd-webserver')
7+
}
8+
9+
task wrapper(type: Wrapper) {
10+
gradleVersion = "4.4.1"
11+
}

Diff for: nanolets/build.gradle

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
description = 'NanoHttpd-nano application server'
2+
3+
dependencies {
4+
compile project(':nanohttpd')
5+
6+
testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.4.1'
7+
}

Diff for: samples/build.gradle

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
description = 'NanoHttpd-Samples'
2+
3+
dependencies {
4+
compile project(':nanohttpd')
5+
compile project(':nanohttpd-webserver')
6+
}
7+
8+
task wrapper(type: Wrapper) {
9+
gradleVersion = "4.4.1"
10+
}

Diff for: settings.gradle

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
rootProject.name = 'nanohttpd-project'
2+
include ':nanohttpd'
3+
include ':nanohttpd-samples'
4+
include ':nanohttpd-webserver'
5+
include ':nanohttpd-websocket'
6+
include ':nanohttpd-webserver-markdown-plugin'
7+
include ':nanohttpd-nanolets'
8+
include ':nanohttpd-apache-fileupload'
9+
10+
project(':nanohttpd').projectDir = "$rootDir/core" as File
11+
project(':nanohttpd-samples').projectDir = "$rootDir/samples" as File
12+
project(':nanohttpd-webserver').projectDir = "$rootDir/webserver" as File
13+
project(':nanohttpd-websocket').projectDir = "$rootDir/websocket" as File
14+
project(':nanohttpd-webserver-markdown-plugin').projectDir = "$rootDir/markdown-plugin" as File
15+
project(':nanohttpd-nanolets').projectDir = "$rootDir/nanolets" as File
16+
project(':nanohttpd-apache-fileupload').projectDir = "$rootDir/fileupload" as File

Diff for: webserver/build.gradle

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
description = 'NanoHttpd-Webserver'
2+
3+
dependencies {
4+
compile project(':nanohttpd')
5+
6+
testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.4.1'
7+
}
8+
9+
task wrapper(type: Wrapper) {
10+
gradleVersion = "4.4.1"
11+
}

Diff for: websocket/build.gradle

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
description = 'NanoHttpd-Websocket'
2+
3+
dependencies {
4+
compile project(':nanohttpd')
5+
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
6+
testCompile group: 'org.eclipse.jetty.websocket', name: 'websocket-client', version: '9.3.0.M2'
7+
}
8+
9+
task wrapper(type: Wrapper) {
10+
gradleVersion = "4.4.1"
11+
}

0 commit comments

Comments
 (0)