瀏覽代碼

gradle构建

nieqiurong 8 年之前
父節點
當前提交
6a1567e2d0
共有 2 個文件被更改,包括 93 次插入0 次删除
  1. 92 0
      mybatis-plus/build.gradle
  2. 1 0
      mybatis-plus/settings.gradle

+ 92 - 0
mybatis-plus/build.gradle

@@ -0,0 +1,92 @@
+apply plugin: 'java'
+apply plugin: 'maven'
+
+ext {
+
+    configuration = [
+        javaVersion = JavaVersion.VERSION_1_7
+    ]
+
+    libraries = [
+            mybatisSpringVersion = '1.3.1',
+            mybatisVersion = '3.4.4',
+            springVersion = '4.3.5.RELEASE',
+    ]
+
+}
+
+group = 'com.baomidou'
+version = '2.0.8'
+
+description = "Mybatis 增强工具包 - 只做增强不做改变,简化CRUD操作"
+
+sourceCompatibility = "${javaVersion}"
+targetCompatibility = "${javaVersion}"
+
+tasks.withType(JavaCompile) {
+	options.encoding = 'UTF-8'
+}
+
+repositories {
+    mavenLocal()
+    mavenCentral()
+    maven { url "http://repo.maven.apache.org/maven2" }
+}
+
+task sourcesJar(type: Jar, dependsOn: classes) {
+    classifier = 'sources'
+    from sourceSets.main.allSource
+}
+
+javadoc {
+    options {
+        encoding "UTF-8"
+        charSet 'UTF-8'
+        author true
+        version true
+        failOnError false
+        links "http://docs.oracle.com/javase/7/docs/api"
+    }
+}
+
+task javadocJar(type: Jar, dependsOn: javadoc) {
+    classifier = 'javadoc'
+    from 'build/docs/javadoc'
+}
+
+artifacts {
+    archives sourcesJar
+    archives javadocJar
+}
+
+def common = [
+        "org.springframework:spring-tx:${springVersion}",
+        "org.springframework:spring-jdbc:${springVersion}",
+        "org.springframework:spring-context-support:${springVersion}",
+        "com.alibaba:druid:1.0.29",
+        "org.apache.velocity:velocity:1.7",
+        "com.github.jsqlparser:jsqlparser:1.0"
+]
+
+dependencies {
+    compile ("org.mybatis:mybatis-spring:${mybatisSpringVersion}")
+    compile ("org.mybatis:mybatis:${mybatisVersion}")
+    compileOnly common
+    testCompileOnly("javax.servlet:servlet-api:2.5")
+    testCompile("org.mybatis.caches:mybatis-ehcache:1.1.0")
+    testCompile("ch.qos.logback:logback-classic:1.2.2")
+    testCompile("junit:junit:4.12")
+    testCompile("org.apache.commons:commons-dbcp2:2.1.1") {
+        exclude(module: 'commons-logging')
+    }
+    testCompile("org.apache.commons:commons-pool2:2.4.2")
+    testCompile("com.microsoft.sqlserver:sqljdbc4:4.0")
+    testCompile("org.postgresql:postgresql:9.4.1212")
+    testCompile("com.oracle:ojdbc14:10.2.0.5.0")
+    testCompile("com.h2database:h2:1.4.194")
+    testCompile("mysql:mysql-connector-java:5.1.38")
+    testCompile common
+    testCompile("org.slf4j:slf4j-api:1.7.25")
+    testCompile("org.slf4j:jcl-over-slf4j:1.7.25")
+    testCompile("org.springframework:spring-test:${springVersion}")
+}

+ 1 - 0
mybatis-plus/settings.gradle

@@ -0,0 +1 @@
+rootProject.name = 'mybatis-plus'