Skip to content

Commit

Permalink
Added gradle build support
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Larson committed Jan 21, 2018
1 parent e33c73a commit 952481e
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -3,12 +3,17 @@ build
target

*.iml
*.ipr
*.iws
*.class

.idea
.classpath
.project
.gradle
gradle/
gradlew
gradlew.bat

# Vim Backup/Swap Files
*~
Expand Down
25 changes: 25 additions & 0 deletions build.gradle
@@ -0,0 +1,25 @@
allprojects {
apply plugin: 'java'
apply plugin: 'idea'

group = 'org.nanohttpd'
version = '2.3.2-SNAPSHOT'
}

subprojects {
apply plugin: 'java'
sourceCompatibility = 1.7
targetCompatibility = 1.7

repositories {
jcenter()
}

dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
}

task wrapper(type: Wrapper) {
gradleVersion = "4.4.1"
}
20 changes: 6 additions & 14 deletions core/build.gradle
@@ -1,18 +1,10 @@
apply plugin: 'java'

version = '2.1.0'

jar {
baseName = 'nanohttpd'
}

repositories {
mavenCentral()
}
description = 'NanoHttpd-Core'

dependencies {
testCompile group: 'junit', name: 'junit', version: '4.8.2'
testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.2.5'
testCompile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.2.5'
testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.2.5'
testCompile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.2.5'
}

task wrapper(type: Wrapper) {
gradleVersion = "4.4.1"
}
15 changes: 15 additions & 0 deletions fileupload/build.gradle
@@ -0,0 +1,15 @@
description = 'NanoHttpd-apache file upload integration'

dependencies {
compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.1'

compileOnly project(':nanohttpd')
compileOnly group: 'javax.servlet', name: 'servlet-api', version: '2.5'

testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.4.1'
testCompile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.4.1'
}

task wrapper(type: Wrapper) {
gradleVersion = "4.4.1"
}
11 changes: 11 additions & 0 deletions markdown-plugin/build.gradle
@@ -0,0 +1,11 @@
description = 'NanoHttpd-Webserver-Markdown-Plugin'

dependencies {
compile group: 'org.pegdown', name: 'pegdown', version: '1.4.1'
compileOnly project(':nanohttpd')
compileOnly project(':nanohttpd-webserver')
}

task wrapper(type: Wrapper) {
gradleVersion = "4.4.1"
}
7 changes: 7 additions & 0 deletions nanolets/build.gradle
@@ -0,0 +1,7 @@
description = 'NanoHttpd-nano application server'

dependencies {
compile project(':nanohttpd')

testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.4.1'
}
10 changes: 10 additions & 0 deletions samples/build.gradle
@@ -0,0 +1,10 @@
description = 'NanoHttpd-Samples'

dependencies {
compile project(':nanohttpd')
compile project(':nanohttpd-webserver')
}

task wrapper(type: Wrapper) {
gradleVersion = "4.4.1"
}
16 changes: 16 additions & 0 deletions settings.gradle
@@ -0,0 +1,16 @@
rootProject.name = 'nanohttpd-project'
include ':nanohttpd'
include ':nanohttpd-samples'
include ':nanohttpd-webserver'
include ':nanohttpd-websocket'
include ':nanohttpd-webserver-markdown-plugin'
include ':nanohttpd-nanolets'
include ':nanohttpd-apache-fileupload'

project(':nanohttpd').projectDir = "$rootDir/core" as File
project(':nanohttpd-samples').projectDir = "$rootDir/samples" as File
project(':nanohttpd-webserver').projectDir = "$rootDir/webserver" as File
project(':nanohttpd-websocket').projectDir = "$rootDir/websocket" as File
project(':nanohttpd-webserver-markdown-plugin').projectDir = "$rootDir/markdown-plugin" as File
project(':nanohttpd-nanolets').projectDir = "$rootDir/nanolets" as File
project(':nanohttpd-apache-fileupload').projectDir = "$rootDir/fileupload" as File
11 changes: 11 additions & 0 deletions webserver/build.gradle
@@ -0,0 +1,11 @@
description = 'NanoHttpd-Webserver'

dependencies {
compile project(':nanohttpd')

testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.4.1'
}

task wrapper(type: Wrapper) {
gradleVersion = "4.4.1"
}
11 changes: 11 additions & 0 deletions websocket/build.gradle
@@ -0,0 +1,11 @@
description = 'NanoHttpd-Websocket'

dependencies {
compile project(':nanohttpd')
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
testCompile group: 'org.eclipse.jetty.websocket', name: 'websocket-client', version: '9.3.0.M2'
}

task wrapper(type: Wrapper) {
gradleVersion = "4.4.1"
}

0 comments on commit 952481e

Please sign in to comment.