Skip to content

Commit

Permalink
from maven to gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
cosyman committed Apr 4, 2015
1 parent d991a1a commit 3f1de43
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 410 deletions.
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ hs_err_pid*
*.log
target
bin
build
test-output
.settings

test-output

*.DS_Store

.idea
*.iml

bower_components/
node_modules/
node_modules/

.gradle
69 changes: 69 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@


buildscript {
repositories {
maven {
url 'http://maven.oschina.net/content/groups/public/'
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.3.RELEASE")
}
}

subprojects {
version '0.9.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
maven {
url 'http://maven.oschina.net/content/groups/public/'
}
}
dependencies {

compile 'org.slf4j:slf4j-api:1.7.12'
compile 'org.slf4j:slf4j-ext:1.7.12'
compile 'ch.qos.logback:logback-classic:1.1.3'
compile 'commons-io:commons-io:2.4'
compile 'org.apache.commons:commons-lang3:3.3.2'
testCompile("junit:junit:4.12")
}

task echo << {
println ddmlib
}
}

project(':device-api') {

ext {
ddmlib = '24.1.3'
}
dependencies {
compile 'org.apache.commons:commons-exec:1.2'
compile 'commons-cli:commons-cli:1.2'
compile "com.android.tools.ddms:ddmlib:$ddmlib"
compile "com.android.tools:dvlib:$ddmlib"
compile "com.android.tools:sdklib:$ddmlib"
compile "com.android.tools:sdk-common:$ddmlib"

}
}

project(':device-node') {



apply plugin: 'spring-boot'

dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
testCompile("org.springframework.boot:spring-boot-starter-test")
}
}

50 changes: 0 additions & 50 deletions device-api/pom.xml

This file was deleted.

23 changes: 23 additions & 0 deletions device-node/src/main/java/SampleController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
* Created by 兰天 on 2015/4/2.
*/
@Controller
@EnableAutoConfiguration
public class SampleController {

@RequestMapping("/")
@ResponseBody
String home() {
return "Hello World!";
}

public static void main(String[] args) throws Exception {
SpringApplication.run(SampleController.class, args);
}
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
systemProp.file.encoding=utf-8
Loading

0 comments on commit 3f1de43

Please sign in to comment.