代码拉取完成,页面将自动刷新
同步操作将从 intellijboy/intellij-blog-sys 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
//插件开发场景中,目标插件需要依赖的包下载中央仓库
buildscript {
repositories {
//读取%M2_HOME%环境变量下面的/conf/setting.xml中的本地maven仓库
mavenLocal()
maven { url 'https://mirrors.huaweicloud.com/repository/maven/' }
maven { url "https://maven.aliyun.com/repository/public" }
gradlePluginPortal()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.2.1.RELEASE"
classpath "io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE"
classpath "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.15.0"
}
}
allprojects {
apply from: this.file('common.gradle')
group rootProject.ext.group
version rootProject.ext.version
}
subprojects {
//java增强插件
apply plugin: 'java-library'
//证书插件
apply plugin: "com.github.hierynomus.license"
//这是默认源码目录配置,这里强调一下,免得idea有时候无法识别源码目录
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/resources']
}
}
test {
java {
srcDirs = ['src/test/java']
}
resources {
srcDirs = ['src/test/resources']
}
}
}
license {
encoding = "UTF-8"
header = rootProject.file("FILE_HEADER.txt")
includes(["**/*.java", "**/*.kt"])
exclude "**/test/**/*.java"
exclude "**/*Test.java"
ignoreFailures = false
}
//依赖管理插件
apply plugin: "io.spring.dependency-management"
dependencyManagement {
dependencies {
//spring framework
dependency "org.springframework.boot:spring-boot:${springBootVersion}"
dependency "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
dependency "org.springframework.boot:spring-boot-autoconfigure:${springBootVersion}"
dependency("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") {
exclude 'org.junit.vintage:junit-vintage-engine'
}
dependency "org.springframework.boot:spring-boot-starter-thymeleaf:${springBootVersion}"
dependency "org.springframework.boot:spring-boot-starter-data-mongodb:${springBootVersion}"
dependency "org.springframework.boot:spring-boot-starter-cache:${springBootVersion}"
dependency "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
dependency "org.springframework.boot:spring-boot-starter-aop:${springBootVersion}"
dependency "org.springframework.boot:spring-boot-starter-jdbc:${springBootVersion}"
dependency "org.springframework.boot:spring-boot-starter-tomcat:${springBootVersion}"
dependency "org.springframework.boot:spring-boot-legacy:1.0.2.RELEASE"//让古老的Servlet起作用
dependency "org.freemarker:freemarker:${freemarkerVersion}"
//shiro
dependency "org.apache.shiro:shiro-spring:${shiroVersion}"
dependency "org.apache.shiro:shiro-core:${shiroVersion}"
dependency "org.apache.shiro:shiro-ehcache:${shiroVersion}"
//cache
dependency "org.springframework.boot:spring-boot-starter-data-redis:${springBootVersion}"
dependency "net.sf.ehcache:ehcache:${ehcacheVersion}"
//mybatis
dependency "org.mybatis:mybatis:${mybatisVersion}"
dependency "org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatisSpringBootStarterVersion}"
dependency "com.baomidou:mybatis-plus-boot-starter:${mybatisPlusVersion}"
//common helper
dependency "javax.servlet:javax.servlet-api:${servletApiVersion}"
dependency "org.apache.velocity:velocity:${velocityVersion}"
dependency "org.apache.httpcomponents:httpmime:${httpcomponentsVersion}"
dependency "org.apache.httpcomponents:httpclient:${httpcomponentsVersion}"
dependency "org.apache.commons:commons-email:${commonsEmailVersion}"
dependency "com.qiniu:qiniu-java-sdk:${qiniuJavaSdkVersion}"
dependency "com.squareup.okhttp3:okhttp:${okhttp3Version}"
dependency "com.google.code.gson:gson:${gsonVersion}"
dependency "com.qiniu:happy-dns-java:${happyDnsJavaVersion}"
dependency "commons-io:commons-io:${commonsIoVersion}"
dependency "com.alibaba:druid:${druidVersion}"
dependency "com.alibaba:fastjson:${fastjsonVersion}"
dependency "cn.hutool:hutool-all:${hutoolAllVersion}"
dependency "org.codehaus.groovy:groovy-json:${groovyJsonVersion}"
//swagger
dependency "io.springfox:springfox-swagger2:${swaggerVersion}"
dependency "io.springfox:springfox-swagger-ui:${swaggerVersion}"
//compileOnly
dependency "org.projectlombok:lombok:${lombokVersion}"
dependency "org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}"
dependency "org.springframework.boot:spring-boot-devtools:${springBootVersion}"
//runtimeOnly
//dependency "com.oracle.ojdbc:ojdbc8:${ojdbc8Version}"
//dependency 'mysql:mysql-connector-java:8.0.18'
dependency "mysql:mysql-connector-java:${mysqlConnectorJavaVersion}"
dependency "ch.qos.logback:logback-classic:${logbackVersion}"
//test
dependency "org.assertj:assertj-core:${assertjCoreVersion}"
dependency "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
dependency "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
}
}
apply plugin: 'maven-publish'
//打包源码
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
publishing {
publications {
maven(MavenPublication) {
//指定group/artifact/version信息,可以不填。默认使用项目group/name/version作为groupId/artifactId/version
groupId project.group
artifactId project.name
version project.version
//如果是war包填写components.web,如果是jar包填写components.java
from components.java
//配置上传源码
artifact sourceJar {
classifier "sources"
}
}
}
repositories {
maven {
def userName = System.getProperty("GRADLE_USER_NAME")
def passWord = System.getProperty("GRADLE_USER_PASSWORD")
def releasesRepoUrl = "https://devrepo.devcloud.cn-north-4.huaweicloud.com/07/nexus/content/repositories/06fc39fb36800ff20fc8c00fb9b55ae0_1_0/"
def snapshotsRepoUrl = "https://devrepo.devcloud.cn-north-4.huaweicloud.com/07/nexus/content/repositories/06fc39fb36800ff20fc8c00fb9b55ae0_2_0/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username userName
password passWord
}
}
}
}
//jdk版本
sourceCompatibility = "${javaVersion}"
targetCompatibility = "${javaVersion}"
//编码配置
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.deprecation = true
options.compilerArgs += ["-parameters"]
}
//中央仓库配置
repositories {
//本地仓库->国内大厂镜像->官网提供仓库
mavenLocal()
maven { url 'https://mirrors.huaweicloud.com/repository/maven/' }
maven { url "https://maven.aliyun.com/repository/public" }
jcenter()
}
jar {
/**
* 默认内容:
* Manifest-Version: 1.0
* Start-Class: cn.kiwipeach.blog.BlogWebApplication
* Spring-Boot-Classes: BOOT-INF/classes/
* Spring-Boot-Lib: BOOT-INF/lib/
* Spring-Boot-Version: 2.2.1.RELEASE
* Main-Class: org.springframework.boot.loader.JarLauncher
*/
afterEvaluate {
manifest {
attributes 'Implementation-Version': rootProject.ext.version
attributes 'Implementation-Title': rootProject.ext.description
attributes 'Built-Gradle': gradle.gradleVersion
attributes 'Bundle-DocURL': 'https://gitee.com/kiwipeach/nice-blog-sys'
attributes 'Build-OS': System.getProperty("os.name")
attributes 'Built-By': System.getProperty("user.name")
attributes 'Build-Jdk': System.getProperty("java.version")
attributes 'Build-Timestamp': new Date().format('yyyy-MM-dd HH:mm:ss')
}
}
}
}
//动态插件配置
//project('blog-sys-boot') { Project project ->
// dependencies {
// implementation (rootProject.ext.dependencies.hutoolAll)
// }
//}
def printProjectDir = {
println("*****************************")
println("Root Dir:${getRootDir()}")
println("Current Project:${getProjectDir()}")
println("Current Project Build Out Dir:${getBuildDir()}")
println("*****************************")
}
printProjectDir.call()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。