gradle_学习_02_gradle多模块构建实例
一、前言
二、多模块构建
1.工程结构

父工程:weixin-service
子模块:weixin-gz
weixin-qy
2.父工程 weixin-service
(1)build.gradle
buildscript {
ext {
springBootVersion = '2.0.1.RELEASE'
}
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
//mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
//配置所有项目
allprojects {
//应用插件
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
//公共属性
group = 'com.ray.weixin'
version = '0.0.1-SNAPSHOT'
//编译属性
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
//构建依赖
subprojects {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
compile('org.springframework.boot:spring-boot-starter-validation')
compile('org.springframework.boot:spring-boot-starter-web')
compileOnly('org.projectlombok:lombok')
// 5. jackson
compile ('com.alibaba:fastjson:1.2.44')
//6. Redis
compile('org.springframework.boot:spring-boot-starter-data-redis')
//7.Quartz
compile('org.springframework.boot:spring-boot-starter-quartz')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
}
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
}
(2)settings.gradle
rootProject.name = 'weixin-service'
include 'weixin-gz'
include 'weixin-qy'
3.子模块 weixin-gz
dependencies {
}
4.子模块 weixin-qy
dependencies {
}
三、参考资料
1.
gradle_学习_02_gradle多模块构建实例的更多相关文章
- Maven多模块构建实例
创建coffee-parent项目 New->Maven Project 创建coffee-web项目 右键coffee-parent项目->New->Project... 注意:需 ...
- 值得 Web 开发人员学习的20个 jQuery 实例教程
这篇文章挑选了20个优秀的 jQuery 实例教程,这些 jQuery 教程将帮助你把你的网站提升到一个更高的水平.其中,既有网站中常用功能的的解决方案,也有极具吸引力的亮点功能的实现方法,相信通过对 ...
- Spring学习笔记IOC与AOP实例
Spring框架核心由两部分组成: 第一部分是反向控制(IOC),也叫依赖注入(DI); 控制反转(依赖注入)的主要内容是指:只描述程序中对象的被创建方式但不显示的创建对象.在以XML语言描述的配置文 ...
- 学习rollup.js模块文件打包
学习rollup.js模块文件打包 一:rollup 是什么?Rollup 是一个 JavaScript 模块打包器,可以将小块代码编译成大块复杂的代码. webpack 和 Rollup 对比不同点 ...
- Python学习 Part4:模块
Python学习 Part4:模块 1. 模块是将定义保存在一个文件中的方法,然后在脚本中或解释器的交互实例中使用.模块中的定义可以被导入到其他模块或者main模块. 模块就是一个包含Python定义 ...
- input子系统学习笔记六 按键驱动实例分析下【转】
转自:http://blog.chinaunix.net/uid-20776117-id-3212095.html 本文接着input子系统学习笔记五 按键驱动实例分析上接续分析这个按键驱动实例! i ...
- Android单片机与蓝牙模块通信实例代码
Android单片机与蓝牙模块通信实例代码 参考路径:http://www.jb51.net/article/83349.htm 啦啦毕业了,毕业前要写毕业设计,需要写一个简单的蓝牙APP进行交互,通 ...
- Python3学习笔记25-logging模块
logging模块,Python自带用来记录日志的模块. 因为工作需要用到关于日志的,最近一直都在看关于日志模块的东西,百度了很多文章,可惜都是看的让人一头雾水,最后运气不错,找到一篇很详细的文章.传 ...
- 手把手教你学node.js之学习使用外部模块
学习使用外部模块 目标 建立一个 lesson2 项目,在其中编写代码. 当在浏览器中访问 http://localhost:3000/?q=alsotang 时,输出 alsotang 的 md5 ...
随机推荐
- qemu-img 的使用
qemu-img是QEMU的磁盘管理工具,在qemu-kvm源码编译后就会默认编译好qemu-img这个二进制文件.qemu-img也是QEMU/KVM使用过程中一个比较重要的工具,本节对其用法和实践 ...
- LeetCode_Easy_471:Number Complement
LeetCode_Easy_471:Number Complement 题目描述 Given a positive integer, output its complement number. The ...
- python调用php函数
由于php不支持多线程,所以想借助python搞一个.1.import subprocessimport time#Simple caller, disguard outputmethod=" ...
- CentOS 6.5下Redmine的安装配置
首先引用百度介绍下redmine: Redmine是用Ruby开发的基于web的项目管理软件,是用ROR框架开发的一套跨平台项目管理系统,据说是源于Basecamp的ror版而来,支持多种数据库,有不 ...
- c# 类的序列化,以及嵌套问题
简单的序列化,网上很多,但是突然想到一个问题,如果一个类里用到了另一个,那么怎么办,今天试了试,只需要加上序列号标签就可以了 using System.Collections; using Syste ...
- Docker 数据管理-bind mount
Use bind mounts Bind mounts have been around since the early days of Docker. Bind mounts have limite ...
- Ubuntu 使用国内apt源
编辑/etc/apt/source-list deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe mult ...
- Python日期时间函数
所有日期.时间的api都在datetime模块内. 1. 日期输出格式化 datetime => string import datetime now = datetime.datetime.n ...
- java入门了解04
1.异常的体系:---------|Throwable --------------| Error (错误) 错误一般是由于jvm或者是硬件引发的问题,所以我们一般都不会通过代码去处理.------- ...
- 探究操作系统【TLCL】
ls – List directory contents file – Determine file type less – View file contents ls常用选项 ls -a 全部输出 ...