diff --git a/build-config/build-base.gradle b/build-config/build-base.gradle index 9a455811..fa9e6212 100644 --- a/build-config/build-base.gradle +++ b/build-config/build-base.gradle @@ -6,6 +6,12 @@ ext { logbackVersion = "1.2.3" } + +apply plugin: "java" +apply plugin: "idea" +apply plugin: "io.spring.dependency-management" + + task copyConfig(type: Copy) { from "src/main/resources/application.properties" from "src/main/resources/application.yaml" @@ -23,6 +29,7 @@ task cleanGridnt(type: Exec) { clean { delete = ["build", "out", "dist_java", "boot", "log", "logs",] } + [compileJava, compileTestJava]*.options*.encoding = "UTF-8" [compileJava, compileTestJava]*.sourceCompatibility = "11" [compileJava, compileTestJava]*.targetCompatibility = "11" @@ -31,7 +38,7 @@ repositories { mavenLocal() mavenCentral() maven { url "https://maven.aliyun.com/repository/public/" } -// maven { url "http://192.168.8.200:8081/repository/public/" } + maven { url "http://192.168.8.200:8081/repository/public/" } } configurations.all { resolutionStrategy.cacheChangingModulesFor 0, "seconds" @@ -53,14 +60,13 @@ dependencies { } jar { -// // 排除掉模块调试的资源文件, 启动类. -// excludes = ["file/WaveAnalysis", "com/gridnt/**/*Starter*", "logback*.xml", -// "application*.properties", "application*.yaml", "config" -// ] + // // 排除掉模块调试的资源文件, 启动类. + // excludes = ["file/WaveAnalysis", "com/gridnt/**/*Starter*", "logback*.xml", + // "application*.properties", "application*.yaml", "config" + // ] manifest { attributes "releaseVersion": version + "-" + getGitVersion() - attributes "vendor": "GRIDNT山东网聪信息科技有限公司 build" - attributes "description": "重新编译打包,引用的其它组织的代码,著作圈原作者所有" + attributes "vendor": "GRIDNT山东网聪信息科技有限公司" attributes "buildTime": new Date().format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("GMT+08:00")) } } diff --git a/build-config/build-publish.gradle b/build-config/build-publish.gradle index e28cf242..03e31565 100644 --- a/build-config/build-publish.gradle +++ b/build-config/build-publish.gradle @@ -1,4 +1,7 @@ apply plugin: "maven-publish" +group = "com.ruoyi" +archivesBaseName = "${project.name}" + task sourcesJar(type: Jar) { from sourceSets.main.allJava diff --git a/build-config/formart.sh b/build-config/formart.sh new file mode 100755 index 00000000..de27d516 --- /dev/null +++ b/build-config/formart.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +## 格式化 jar 引用 + +find . -name "build.gradle" | xargs sed -r -i "s/'/\"/g" +find . -name "build.gradle" | xargs sed -r -i 's/compile group: /compile /g' +find . -name "build.gradle" | xargs sed -r -i 's/compileOnly group: /compileOnly /g' +find . -name "build.gradle" | xargs sed -r -i 's/implementation group: /implementation /g' +find . -name "build.gradle" | xargs sed -r -i 's/testRuntime group: /testRuntime /g' +find . -name "build.gradle" | xargs sed -r -i 's/testImplementation group: /testImplementation /g' +find . -name "build.gradle" | xargs sed -r -i 's/", name: "|", version: "/:/g' + diff --git a/build-config/publish.sh b/build-config/publish.sh index 1e66a680..8c0a1e07 100755 --- a/build-config/publish.sh +++ b/build-config/publish.sh @@ -3,5 +3,4 @@ # 使用方法: ./publish.sh 版本号. # git pull; git add . ;git commit -m " 发布版本 $*" ; git push -gradle --daemon --parallel -DbuildProduct=true clean publish -DreleaseVersion=$1 - +gradle --daemon --parallel -DbuildProduct=true clean publish -DreleaseVersion=$1 \ No newline at end of file diff --git a/build-product.gradle b/build-product.gradle index b06d02ff..36a06a40 100644 --- a/build-product.gradle +++ b/build-product.gradle @@ -5,8 +5,8 @@ ext { } dependencies { runtime group: 'org.springframework.cloud', name: 'spring-cloud-dependencies', version: 'Hoxton.SR9', ext: 'pom' - - + + implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.4" implementation "com.alibaba.cloud:spring-cloud-alibaba-sentinel-gateway:${alibabaCloud}" implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:${alibabaCloud}" implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:${alibabaCloud}" @@ -28,7 +28,13 @@ dependencies { implementation "org.apache.commons:commons-lang3:3.11" implementation "org.apache.commons:commons-pool2:2.9.0" implementation "org.apache.poi:poi-ooxml:4.1.2" + implementation "org.quartz-scheduler:quartz:2.3.2" + + implementation "org.springframework:spring-context-support:5.3.2" + implementation "org.springframework.boot:spring-boot-autoconfigure:${springBoot}" + + implementation "org.springframework.boot:spring-boot-starter-actuator:${springBoot}" implementation "org.springframework.boot:spring-boot-starter-data-redis:${springBoot}" implementation "org.springframework.boot:spring-boot-starter-security:${springBoot}" @@ -38,4 +44,4 @@ dependencies { implementation "org.springframework.cloud:spring-cloud-starter-openfeign:${springCloud}" implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" -} \ No newline at end of file +} diff --git a/ruoyi-api/ruoyi-api-system/build.gradle b/ruoyi-api/ruoyi-api-system/build.gradle index 885a43a3..66be34ac 100644 --- a/ruoyi-api/ruoyi-api-system/build.gradle +++ b/ruoyi-api/ruoyi-api-system/build.gradle @@ -1,8 +1,48 @@ -apply from: "../../build-config/build-base.gradle" -apply from: "../../build-config/build-publish.gradle" -apply from: "../../build-product.gradle" -dependencies { - implementation project(':ruoyi-common-core') +buildscript { + repositories { + mavenLocal() + mavenCentral() + maven { url "https://maven.aliyun.com/repository/public/" } + maven { url "https://plugins.gradle.org/m2/" } + } + + ext { + springBoot = "2.4.0" + alibabaCloud = "2.2.3.RELEASE" + springCloud = "2.2.6.RELEASE" + } + + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBoot}") + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8" + } } -description = 'ruoyi-api-system' + +ext { + devVersion = "dev-9-SNAPSHOT" +} + + +description = "ruoyi-api-system" +apply from: "../../build-config/build-all.gradle" +apply from: "../../build-config/build-base.gradle" +apply from: "../../build-config/build-publish.gradle" + +group = "com.ruoyi" +archivesBaseName = "${project.name}" + +dependencies { + + implementation "com.ruoyi:ruoyi-common-core:${devVersion}" + implementation "org.apache.commons:commons-lang3:3.11" + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-validation:${springBoot}" + implementation "org.springframework.cloud:spring-cloud-starter-openfeign:${springCloud}" +} + +static def getGitVersion() { + + return System.getProperty("gitVersion") ?: "git rev-parse --short HEAD".execute().text.trim() + +} diff --git a/ruoyi-api/ruoyi-api-system/formart.sh b/ruoyi-api/ruoyi-api-system/formart.sh new file mode 120000 index 00000000..48bef4b9 --- /dev/null +++ b/ruoyi-api/ruoyi-api-system/formart.sh @@ -0,0 +1 @@ +../../build-config/formart.sh \ No newline at end of file diff --git a/ruoyi-api/ruoyi-api-system/gradle/wrapper/gradle-wrapper.jar b/ruoyi-api/ruoyi-api-system/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..62d4c053 Binary files /dev/null and b/ruoyi-api/ruoyi-api-system/gradle/wrapper/gradle-wrapper.jar differ diff --git a/ruoyi-api/ruoyi-api-system/gradle/wrapper/gradle-wrapper.properties b/ruoyi-api/ruoyi-api-system/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..622ab64a --- /dev/null +++ b/ruoyi-api/ruoyi-api-system/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/ruoyi-api/ruoyi-api-system/gradlew b/ruoyi-api/ruoyi-api-system/gradlew new file mode 100755 index 00000000..fbd7c515 --- /dev/null +++ b/ruoyi-api/ruoyi-api-system/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/ruoyi-api/ruoyi-api-system/gradlew.bat b/ruoyi-api/ruoyi-api-system/gradlew.bat new file mode 100644 index 00000000..5093609d --- /dev/null +++ b/ruoyi-api/ruoyi-api-system/gradlew.bat @@ -0,0 +1,104 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/ruoyi-api/ruoyi-api-system/publish.sh b/ruoyi-api/ruoyi-api-system/publish.sh new file mode 120000 index 00000000..81b8b74d --- /dev/null +++ b/ruoyi-api/ruoyi-api-system/publish.sh @@ -0,0 +1 @@ +../../build-config/publish.sh \ No newline at end of file diff --git a/ruoyi-api/ruoyi-api-system/settings.gradle b/ruoyi-api/ruoyi-api-system/settings.gradle new file mode 100644 index 00000000..83ef8c7b --- /dev/null +++ b/ruoyi-api/ruoyi-api-system/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'ruoyi-api-system' \ No newline at end of file diff --git a/ruoyi-auth/build.gradle b/ruoyi-auth/build.gradle index 04c7e158..02baa2d2 100644 --- a/ruoyi-auth/build.gradle +++ b/ruoyi-auth/build.gradle @@ -1,12 +1,45 @@ -apply from: "../build-config/build-base.gradle" -apply from: "../build-config/build-boot-jar.gradle" -apply from: "../build-product.gradle" - -dependencies { - - implementation project(':ruoyi-common-security') - implementation project(':ruoyi-common-core') - implementation project(':ruoyi-api-system') +buildscript { + repositories { + maven { url "https://plugins.gradle.org/m2/" } + } + ext { + springBoot = "2.4.0" + alibabaCloud = "2.2.3.RELEASE" + springCloud = "2.2.6.RELEASE" + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBoot}") + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0" + } } -description = 'ruoyi-auth' +ext { + devVersion = "dev-9-SNAPSHOT" +} + +description = "ruoyi-api-system" +apply from: "../build-config/build-all.gradle" +apply from: "../build-config/build-base.gradle" +apply from: "../build-config/build-boot-jar.gradle" + +group = "com.ruoyi" +archivesBaseName = "${project.name}" + +dependencies { + implementation "com.ruoyi:ruoyi-common-core:${devVersion}" + implementation "com.ruoyi:ruoyi-common-security:${devVersion}" + implementation "com.ruoyi:ruoyi-api-system:${devVersion}" + + implementation "com.alibaba:fastjson:1.2.75" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:${alibabaCloud}" + + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-actuator:${springBoot}" + implementation "mysql:mysql-connector-java:8.0.21" +} + +static def getGitVersion() { + return System.getProperty("gitVersion") ?: "git rev-parse --short HEAD".execute().text.trim() +} diff --git a/ruoyi-auth/gradle/wrapper/gradle-wrapper.jar b/ruoyi-auth/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..f6b961fd Binary files /dev/null and b/ruoyi-auth/gradle/wrapper/gradle-wrapper.jar differ diff --git a/ruoyi-auth/gradle/wrapper/gradle-wrapper.properties b/ruoyi-auth/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..25129900 --- /dev/null +++ b/ruoyi-auth/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Wed Dec 16 14:00:12 CST 2020 +distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip +distributionPath=wrapper/dists +zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/ruoyi-auth/gradlew b/ruoyi-auth/gradlew new file mode 100644 index 00000000..cccdd3d5 --- /dev/null +++ b/ruoyi-auth/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/ruoyi-auth/gradlew.bat b/ruoyi-auth/gradlew.bat new file mode 100644 index 00000000..f9553162 --- /dev/null +++ b/ruoyi-auth/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/ruoyi-auth/settings.gradle b/ruoyi-auth/settings.gradle new file mode 100644 index 00000000..70282485 --- /dev/null +++ b/ruoyi-auth/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'ruoyi-auth' diff --git a/ruoyi-common/build-product.gradle b/ruoyi-common/build-product.gradle new file mode 100644 index 00000000..a6c6c47a --- /dev/null +++ b/ruoyi-common/build-product.gradle @@ -0,0 +1,43 @@ +ext { + springBoot = "2.4.0" + alibabaCloud = "2.2.3.RELEASE" + springCloud = "2.2.6.RELEASE" +} +dependencies { + runtime group: 'org.springframework.cloud', name: 'spring-cloud-dependencies', version: 'Hoxton.SR9', ext: 'pom' + implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.4" + implementation "com.alibaba.cloud:spring-cloud-alibaba-sentinel-gateway:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:${alibabaCloud}" + implementation "com.alibaba.csp:sentinel-datasource-nacos:1.8.0" + implementation "com.alibaba:fastjson:1.2.75" + implementation "com.fasterxml.jackson.core:jackson-databind:2.12.0" + implementation "com.github.pagehelper:pagehelper-spring-boot-starter:1.3.0" + implementation "com.github.penggle:kaptcha:2.3.2" + implementation "com.github.tobato:fastdfs-client:1.27.2" + implementation "commons-fileupload:commons-fileupload:1.4" + implementation "commons-io:commons-io:2.8.0" + implementation "de.codecentric:spring-boot-admin-starter-server:2.3.0" + implementation "io.springfox:springfox-swagger2:2.9.2" + implementation "io.springfox:springfox-swagger-ui:2.9.2" + implementation "io.swagger:swagger-annotations:1.5.24" + implementation "javax.servlet:javax.servlet-api:4.0.1" + implementation "mysql:mysql-connector-java:8.0.21" + implementation "org.apache.commons:commons-lang3:3.11" + implementation "org.apache.commons:commons-pool2:2.9.0" + implementation "org.apache.poi:poi-ooxml:4.1.2" + implementation "org.quartz-scheduler:quartz:2.3.2" + + implementation "org.springframework.boot:spring-boot-autoconfigure:${springBoot}" + + implementation "org.springframework.boot:spring-boot-starter-actuator:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-data-redis:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-security:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-validation:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + implementation "org.springframework.cloud:spring-cloud-starter-gateway:${springCloud}" + implementation "org.springframework.cloud:spring-cloud-starter-openfeign:${springCloud}" + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + +} \ No newline at end of file diff --git a/build.gradle b/ruoyi-common/build.gradle similarity index 61% rename from build.gradle rename to ruoyi-common/build.gradle index 1e2d0898..db9f6830 100644 --- a/build.gradle +++ b/ruoyi-common/build.gradle @@ -3,28 +3,35 @@ buildscript { mavenLocal() mavenCentral() maven { url "https://maven.aliyun.com/repository/public/" } -// maven { url "http://192.168.8.200:8081/repository/public/" } maven { url "https://plugins.gradle.org/m2/" } } ext { springBoot = "2.4.0" + alibabaCloud = "2.2.3.RELEASE" + springCloud = "2.2.6.RELEASE" } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBoot}") classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8" } } + ext { devVersion = "dev-9-SNAPSHOT" + springBoot = "2.4.0" + alibabaCloud = "2.2.3.RELEASE" + springCloud = "2.2.6.RELEASE" } +apply from: "../build-config/build-all.gradle" -apply from: "build-config/build-all.gradle" subprojects { - apply plugin: "java" - apply plugin: "idea" - apply plugin: "io.spring.dependency-management" - archivesBaseName = "project-${project.name}" + + apply from: "../../build-config/build-base.gradle" + apply from: "../../build-config/build-publish.gradle" + + group = "com.ruoyi" + archivesBaseName = "${project.name}" } static def getGitVersion() { diff --git a/ruoyi-common/formart.sh b/ruoyi-common/formart.sh new file mode 120000 index 00000000..edb0215d --- /dev/null +++ b/ruoyi-common/formart.sh @@ -0,0 +1 @@ +../build-config/formart.sh \ No newline at end of file diff --git a/ruoyi-common/list b/ruoyi-common/list new file mode 100644 index 00000000..4ea7c65b --- /dev/null +++ b/ruoyi-common/list @@ -0,0 +1,25 @@ + +> Configure project : +com.ruoyi ruoyi-common-core publishing version is dev-9-SNAPSHOT +com.ruoyi ruoyi-common-datascope publishing version is dev-9-SNAPSHOT +com.ruoyi ruoyi-common-log publishing version is dev-9-SNAPSHOT +com.ruoyi ruoyi-common-redis publishing version is dev-9-SNAPSHOT +com.ruoyi ruoyi-common-security publishing version is dev-9-SNAPSHOT +com.ruoyi ruoyi-common-swagger publishing version is dev-9-SNAPSHOT + +> Task :dependencies + +------------------------------------------------------------ +Root project +------------------------------------------------------------ + +No configurations + +A web-based, searchable dependency report is available by adding the --scan option. + +Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. +Use '--warning-mode all' to show the individual deprecation warnings. +See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings + +BUILD SUCCESSFUL in 563ms +1 actionable task: 1 executed diff --git a/ruoyi-common/publish.sh b/ruoyi-common/publish.sh deleted file mode 100755 index 926f5b00..00000000 --- a/ruoyi-common/publish.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/bash -# 发布之前,必须先提交 !!!! 发布之前,必须先提交 !!!! 发布之前,必须先提交 !!!! -# 使用方法: ./publish.sh 版本号. -# git pull; git add . ;git commit -m " 发布版本 $*" ; git push - -for p in $(ls .) -do - gradle --daemon --parallel -DbuildProduct=true -b $p/build.grade clean publish -DreleaseVersion=$1 -done - - - diff --git a/ruoyi-common/publish.sh b/ruoyi-common/publish.sh new file mode 120000 index 00000000..5116e84d --- /dev/null +++ b/ruoyi-common/publish.sh @@ -0,0 +1 @@ +../build-config/publish.sh \ No newline at end of file diff --git a/ruoyi-common/ruoyi-common-core/build.gradle b/ruoyi-common/ruoyi-common-core/build.gradle index 197da392..4b0a4c77 100644 --- a/ruoyi-common/ruoyi-common-core/build.gradle +++ b/ruoyi-common/ruoyi-common-core/build.gradle @@ -1,13 +1,19 @@ -group = "com.ruoyi" - -apply from: "../../build-config/build-base.gradle" -apply from: "../../build-config/build-publish.gradle" - -apply from: "../../build-product.gradle" - dependencies { + implementation "org.springframework.cloud:spring-cloud-starter-openfeign:${springCloud}" + implementation "org.springframework.boot:spring-boot-starter-validation:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + implementation "com.github.pagehelper:pagehelper-spring-boot-starter:1.3.0" + implementation "com.alibaba:fastjson:1.2.75" + implementation "com.fasterxml.jackson.core:jackson-databind:2.12.0" + implementation "commons-io:commons-io:2.8.0" + implementation "org.apache.poi:poi-ooxml:4.1.2" + implementation "org.apache.commons:commons-lang3:3.11" + implementation "org.apache.commons:commons-pool2:2.9.0" + implementation "commons-fileupload:commons-fileupload:1.4" + implementation "javax.servlet:javax.servlet-api:4.0.1" + implementation "io.swagger:swagger-annotations:1.5.24" } -description = 'ruoyi-common-core' +description = "ruoyi-common-core" diff --git a/ruoyi-common/ruoyi-common-datascope/build.gradle b/ruoyi-common/ruoyi-common-datascope/build.gradle index 88edcba9..63601fe0 100644 --- a/ruoyi-common/ruoyi-common-datascope/build.gradle +++ b/ruoyi-common/ruoyi-common-datascope/build.gradle @@ -1,14 +1,13 @@ -group = "com.ruoyi" - -apply from: "../../build-config/build-base.gradle" -apply from: "../../build-config/build-publish.gradle" -apply from: "../../build-product.gradle" dependencies { - implementation project(':ruoyi-common-core') - implementation project(':ruoyi-common-security') - implementation project(':ruoyi-api-system') + implementation project(":ruoyi-common-core") + implementation project(":ruoyi-common-security") + implementation "com.ruoyi:ruoyi-api-system:${devVersion}" + + implementation "org.aspectj:aspectjweaver:1.9.6" + implementation "org.apache.commons:commons-lang3:3.11" + implementation "org.springframework.boot:spring-boot-starter-validation:${springBoot}" } -description = 'ruoyi-common-datascope' +description = "ruoyi-common-datascope" diff --git a/ruoyi-common/ruoyi-common-log/build.gradle b/ruoyi-common/ruoyi-common-log/build.gradle index 068d6880..122b7c89 100644 --- a/ruoyi-common/ruoyi-common-log/build.gradle +++ b/ruoyi-common/ruoyi-common-log/build.gradle @@ -1,12 +1,15 @@ -group = "com.ruoyi" -apply from: "../../build-config/build-base.gradle" -apply from: "../../build-config/build-publish.gradle" - -apply from: "../../build-product.gradle" dependencies { - implementation project(':ruoyi-api-system') - implementation project(':ruoyi-common-security') - implementation project(':ruoyi-common-core') + implementation project(":ruoyi-common-security") + implementation project(":ruoyi-common-core") + + implementation "com.ruoyi:ruoyi-api-system:${devVersion}" + + implementation "com.alibaba:fastjson:1.2.75" + implementation "org.apache.commons:commons-lang3:3.11" + implementation "org.aspectj:aspectjweaver:1.9.6" + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + implementation "org.springframework.boot:spring-boot-autoconfigure:${springBoot}" + } -description = 'ruoyi-common-log' +description = "ruoyi-common-log" diff --git a/ruoyi-common/ruoyi-common-redis/build.gradle b/ruoyi-common/ruoyi-common-redis/build.gradle index ff9ed56e..50685d05 100644 --- a/ruoyi-common/ruoyi-common-redis/build.gradle +++ b/ruoyi-common/ruoyi-common-redis/build.gradle @@ -1,12 +1,9 @@ -group = "com.ruoyi" -apply from: "../../build-config/build-base.gradle" -apply from: "../../build-config/build-publish.gradle" - -apply from: "../../build-product.gradle" - dependencies { + implementation project(":ruoyi-common-core") - implementation project(':ruoyi-common-core') + implementation "com.alibaba:fastjson:1.2.75" + implementation "com.fasterxml.jackson.core:jackson-databind:2.12.0" + implementation "org.springframework.boot:spring-boot-starter-data-redis:2.3.4.RELEASE" } -description = 'ruoyi-common-redis' +description = "ruoyi-common-redis" diff --git a/ruoyi-common/ruoyi-common-security/build.gradle b/ruoyi-common/ruoyi-common-security/build.gradle index 0d8ab91f..20b91bae 100644 --- a/ruoyi-common/ruoyi-common-security/build.gradle +++ b/ruoyi-common/ruoyi-common-security/build.gradle @@ -1,12 +1,21 @@ -group = "com.ruoyi" -apply from: "../../build-config/build-base.gradle" -apply from: "../../build-config/build-publish.gradle" +description = "ruoyi-common-security" -apply from: "../../build-product.gradle" dependencies { - implementation project(':ruoyi-common-core') - implementation project(':ruoyi-api-system') - implementation project(':ruoyi-common-redis') + implementation project(":ruoyi-common-core") + implementation project(":ruoyi-common-redis") + + implementation "com.ruoyi:ruoyi-api-system:${devVersion}" + + implementation "org.apache.commons:commons-lang3:3.11" + implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.4" +// implementation "org.springframework.boot:spring-boot-autoconfigure:${springBoot}" + + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-security:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-validation:${springBoot}" + implementation "org.springframework.cloud:spring-cloud-starter-openfeign:${springCloud}" + + } -description = 'ruoyi-common-security' + diff --git a/ruoyi-common/ruoyi-common-swagger/build.gradle b/ruoyi-common/ruoyi-common-swagger/build.gradle index 85646729..1a58d97c 100644 --- a/ruoyi-common/ruoyi-common-swagger/build.gradle +++ b/ruoyi-common/ruoyi-common-swagger/build.gradle @@ -1,10 +1,6 @@ -group = "com.ruoyi" -apply from: "../../build-config/build-base.gradle" -apply from: "../../build-config/build-publish.gradle" - -apply from: "../../build-product.gradle" dependencies { - + implementation "org.springframework.boot:spring-boot-starter-web:2.3.4.RELEASE" + implementation "io.springfox:springfox-swagger2:2.9.2" } -description = 'ruoyi-common-swagger' +description = "ruoyi-common-swagger" diff --git a/ruoyi-common/settings.gradle b/ruoyi-common/settings.gradle new file mode 100644 index 00000000..52ff333b --- /dev/null +++ b/ruoyi-common/settings.gradle @@ -0,0 +1,7 @@ +rootProject.name = 'ruoyi-common' +include('ruoyi-common-log') +include('ruoyi-common-core') +include('ruoyi-common-datascope') +include('ruoyi-common-swagger') +include('ruoyi-common-redis') +include('ruoyi-common-security') diff --git a/ruoyi-gateway/build.gradle b/ruoyi-gateway/build.gradle index 8e5070a3..99109cf4 100644 --- a/ruoyi-gateway/build.gradle +++ b/ruoyi-gateway/build.gradle @@ -1,10 +1,56 @@ -apply from: "../build-config/build-base.gradle" -apply from: "../build-config/build-boot-jar.gradle" -apply from: "../build-product.gradle" -dependencies { - implementation project(':ruoyi-common-redis') - implementation project(':ruoyi-common-security') - implementation project(':ruoyi-common-core') +buildscript { + repositories { + maven { url "https://plugins.gradle.org/m2/" } + } + ext { + springBoot = "2.4.0" + alibabaCloud = "2.2.3.RELEASE" + springCloud = "2.2.6.RELEASE" + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBoot}") + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0" + } } -description = 'ruoyi-gateway' +ext { + devVersion = "dev-9-SNAPSHOT" +} + +description = "ruoyi-api-system" +apply from: "../build-config/build-all.gradle" +apply from: "../build-config/build-base.gradle" +apply from: "../build-config/build-boot-jar.gradle" + +group = "com.ruoyi" +archivesBaseName = "${project.name}" + +dependencies { + implementation "com.ruoyi:ruoyi-common-core:${devVersion}" + implementation "com.ruoyi:ruoyi-common-redis:${devVersion}" + implementation "com.ruoyi:ruoyi-common-security:${devVersion}" + implementation "com.ruoyi:ruoyi-api-system:${devVersion}" + + + implementation "com.github.penggle:kaptcha:2.3.2" + implementation "io.springfox:springfox-swagger2:2.9.2" + implementation "io.springfox:springfox-swagger-ui:2.9.2" + implementation "com.alibaba.csp:sentinel-datasource-nacos:1.8.0" + + + implementation "org.springframework.boot:spring-boot-starter-actuator:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-data-redis:${springBoot}" + + implementation "org.springframework.cloud:spring-cloud-starter-gateway:${springCloud}" + + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-alibaba-sentinel-gateway:${alibabaCloud}" + + +} + +static def getGitVersion() { + return System.getProperty("gitVersion") ?: "git rev-parse --short HEAD".execute().text.trim() +} diff --git a/ruoyi-gateway/formart.sh b/ruoyi-gateway/formart.sh new file mode 120000 index 00000000..edb0215d --- /dev/null +++ b/ruoyi-gateway/formart.sh @@ -0,0 +1 @@ +../build-config/formart.sh \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/ruoyi-gateway/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from gradle/wrapper/gradle-wrapper.jar rename to ruoyi-gateway/gradle/wrapper/gradle-wrapper.jar diff --git a/gradle/wrapper/gradle-wrapper.properties b/ruoyi-gateway/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from gradle/wrapper/gradle-wrapper.properties rename to ruoyi-gateway/gradle/wrapper/gradle-wrapper.properties diff --git a/gradlew b/ruoyi-gateway/gradlew similarity index 100% rename from gradlew rename to ruoyi-gateway/gradlew diff --git a/gradlew.bat b/ruoyi-gateway/gradlew.bat similarity index 100% rename from gradlew.bat rename to ruoyi-gateway/gradlew.bat diff --git a/ruoyi-gateway/settings.gradle b/ruoyi-gateway/settings.gradle new file mode 100644 index 00000000..7f04e458 --- /dev/null +++ b/ruoyi-gateway/settings.gradle @@ -0,0 +1,5 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +rootProject.name = 'ruoyi-gateway' diff --git a/ruoyi-modules/ruoyi-file/build.gradle b/ruoyi-modules/ruoyi-file/build.gradle index 93f09230..029528df 100644 --- a/ruoyi-modules/ruoyi-file/build.gradle +++ b/ruoyi-modules/ruoyi-file/build.gradle @@ -1,13 +1,49 @@ +buildscript { + repositories { + maven { url "https://plugins.gradle.org/m2/" } + } + ext { + springBoot = "2.4.0" + alibabaCloud = "2.2.3.RELEASE" + springCloud = "2.2.6.RELEASE" + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBoot}") + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0" + } +} + +ext { + devVersion = "dev-9-SNAPSHOT" +} + +description = "ruoyi-modules-file" +apply from: "../../build-config/build-all.gradle" apply from: "../../build-config/build-base.gradle" apply from: "../../build-config/build-boot-jar.gradle" -apply from: "../../build-product.gradle" -dependencies { - implementation project(':ruoyi-api-system') - implementation project(':ruoyi-common-core') - implementation project(':ruoyi-common-swagger') +group = "com.ruoyi" +archivesBaseName = "${project.name}" +dependencies { + + implementation "com.ruoyi:ruoyi-common-core:${devVersion}" + implementation "com.ruoyi:ruoyi-common-swagger:${devVersion}" + implementation "com.ruoyi:ruoyi-api-system:${devVersion}" + + + implementation "io.springfox:springfox-swagger-ui:2.9.2" + implementation "com.github.tobato:fastdfs-client:1.27.2" + implementation "commons-fileupload:commons-fileupload:1.4" + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-actuator:${springBoot}" + + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:${alibabaCloud}" } -description = 'ruoyi-modules-file' +static def getGitVersion() { + return System.getProperty("gitVersion") ?: "git rev-parse --short HEAD".execute().text.trim() +} diff --git a/ruoyi-modules/ruoyi-file/gradle/wrapper/gradle-wrapper.jar b/ruoyi-modules/ruoyi-file/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..62d4c053 Binary files /dev/null and b/ruoyi-modules/ruoyi-file/gradle/wrapper/gradle-wrapper.jar differ diff --git a/ruoyi-modules/ruoyi-file/gradle/wrapper/gradle-wrapper.properties b/ruoyi-modules/ruoyi-file/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..622ab64a --- /dev/null +++ b/ruoyi-modules/ruoyi-file/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/ruoyi-modules/ruoyi-file/gradlew b/ruoyi-modules/ruoyi-file/gradlew new file mode 100755 index 00000000..fbd7c515 --- /dev/null +++ b/ruoyi-modules/ruoyi-file/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/ruoyi-modules/ruoyi-file/gradlew.bat b/ruoyi-modules/ruoyi-file/gradlew.bat new file mode 100644 index 00000000..5093609d --- /dev/null +++ b/ruoyi-modules/ruoyi-file/gradlew.bat @@ -0,0 +1,104 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/ruoyi-modules/ruoyi-file/settings.gradle b/ruoyi-modules/ruoyi-file/settings.gradle new file mode 100644 index 00000000..9dc772a2 --- /dev/null +++ b/ruoyi-modules/ruoyi-file/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'ruoyi-file' diff --git a/ruoyi-modules/ruoyi-gen/build.gradle b/ruoyi-modules/ruoyi-gen/build.gradle index 1666eacb..7bff28f0 100644 --- a/ruoyi-modules/ruoyi-gen/build.gradle +++ b/ruoyi-modules/ruoyi-gen/build.gradle @@ -1,23 +1,51 @@ -apply from: "../../build-config/build-base.gradle" -apply from: "../../build-config/build-boot-jar.gradle" -apply from: "../../build-product.gradle" - -dependencies { - implementation project(':ruoyi-common-log') - implementation project(':ruoyi-common-security') - implementation project(':ruoyi-common-core') - implementation project(':ruoyi-common-swagger') - - implementation 'com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.3.RELEASE' - implementation 'com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2.2.3.RELEASE' - implementation 'com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:2.2.3.RELEASE' - - implementation 'org.springframework.boot:spring-boot-starter-actuator:2.3.4.RELEASE' - implementation 'org.springframework.boot:spring-boot-starter-validation:2.3.4.RELEASE' - - implementation 'io.springfox:springfox-swagger-ui:2.9.2' - implementation 'org.apache.velocity:velocity:1.7' - implementation 'mysql:mysql-connector-java:8.0.21' +buildscript { + repositories { + maven { url "https://plugins.gradle.org/m2/" } + } + ext { + springBoot = "2.4.0" + alibabaCloud = "2.2.3.RELEASE" + springCloud = "2.2.6.RELEASE" + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBoot}") + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0" + } } -description = 'ruoyi-modules-gen' +ext { + devVersion = "dev-9-SNAPSHOT" +} + +description = "ruoyi-modules-file" +apply from: "../../build-config/build-all.gradle" +apply from: "../../build-config/build-base.gradle" +apply from: "../../build-config/build-boot-jar.gradle" + +group = "com.ruoyi" +archivesBaseName = "${project.name}" + +dependencies { + + implementation "com.ruoyi:ruoyi-common-log:${devVersion}" + implementation "com.ruoyi:ruoyi-common-core:${devVersion}" + implementation "com.ruoyi:ruoyi-common-security:${devVersion}" + implementation "com.ruoyi:ruoyi-common-swagger:${devVersion}" + + implementation "org.apache.velocity:velocity:1.7" + implementation "mysql:mysql-connector-java:8.0.21" + implementation "io.springfox:springfox-swagger-ui:2.9.2" + implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.4" + + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:${alibabaCloud}" + + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-actuator:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-validation:${springBoot}" +} + +static def getGitVersion() { + return System.getProperty("gitVersion") ?: "git rev-parse --short HEAD".execute().text.trim() +} diff --git a/ruoyi-modules/ruoyi-gen/gradle/wrapper/gradle-wrapper.jar b/ruoyi-modules/ruoyi-gen/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..e708b1c0 Binary files /dev/null and b/ruoyi-modules/ruoyi-gen/gradle/wrapper/gradle-wrapper.jar differ diff --git a/ruoyi-modules/ruoyi-gen/gradle/wrapper/gradle-wrapper.properties b/ruoyi-modules/ruoyi-gen/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..be52383e --- /dev/null +++ b/ruoyi-modules/ruoyi-gen/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/ruoyi-modules/ruoyi-gen/gradlew b/ruoyi-modules/ruoyi-gen/gradlew new file mode 100755 index 00000000..4f906e0c --- /dev/null +++ b/ruoyi-modules/ruoyi-gen/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/ruoyi-modules/ruoyi-gen/gradlew.bat b/ruoyi-modules/ruoyi-gen/gradlew.bat new file mode 100644 index 00000000..107acd32 --- /dev/null +++ b/ruoyi-modules/ruoyi-gen/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/ruoyi-modules/ruoyi-gen/settings.gradle b/ruoyi-modules/ruoyi-gen/settings.gradle new file mode 100644 index 00000000..ebc3bcdd --- /dev/null +++ b/ruoyi-modules/ruoyi-gen/settings.gradle @@ -0,0 +1,5 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +rootProject.name = 'ruoyi-modules-gen' diff --git a/ruoyi-modules/ruoyi-job/build.gradle b/ruoyi-modules/ruoyi-job/build.gradle index d81c7c3a..a19b4345 100644 --- a/ruoyi-modules/ruoyi-job/build.gradle +++ b/ruoyi-modules/ruoyi-job/build.gradle @@ -1,13 +1,60 @@ +buildscript { + repositories { + maven { url "https://plugins.gradle.org/m2/" } + } + ext { + springBoot = "2.4.0" + alibabaCloud = "2.2.3.RELEASE" + springCloud = "2.2.6.RELEASE" + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBoot}") + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0" + } +} + +ext { + devVersion = "dev-9-SNAPSHOT" +} + +description = "ruoyi-modules-file" +apply from: "../../build-config/build-all.gradle" apply from: "../../build-config/build-base.gradle" apply from: "../../build-config/build-boot-jar.gradle" -apply from: "../../build-product.gradle" +group = "com.ruoyi" +archivesBaseName = "${project.name}" dependencies { - implementation project(':ruoyi-common-log') - implementation project(':ruoyi-common-swagger') - implementation project(':ruoyi-common-core') - implementation project(':ruoyi-common-security') + + implementation "com.ruoyi:ruoyi-common-log:${devVersion}" + implementation "com.ruoyi:ruoyi-common-swagger:${devVersion}" + implementation "com.ruoyi:ruoyi-common-security:${devVersion}" + implementation "com.ruoyi:ruoyi-common-core:${devVersion}" + + + implementation "mysql:mysql-connector-java:8.0.21" + implementation "org.quartz-scheduler:quartz:2.3.2" + implementation "io.springfox:springfox-swagger-ui:2.9.2" + implementation "com.github.tobato:fastdfs-client:1.27.2" + implementation "commons-fileupload:commons-fileupload:1.4" + implementation "org.springframework:spring-context-support:5.3.2" + implementation "org.springframework.boot:spring-boot-autoconfigure:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-jdbc:${springBoot}" + implementation "org.springframework.boot:spring-boot-autoconfigure:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-actuator:${springBoot}" + implementation "org.springframework.cloud:spring-cloud-starter-openfeign:${springCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:${alibabaCloud}" + +// implementation "org.springframework.boot:spring-boot-starter-security:${springBoot}" +// implementation "org.springframework.boot:spring-boot-starter-validation:${springBoot}" + + } -description = 'ruoyi-modules-job' +static def getGitVersion() { + return System.getProperty("gitVersion") ?: "git rev-parse --short HEAD".execute().text.trim() +} diff --git a/ruoyi-modules/ruoyi-job/gradle/wrapper/gradle-wrapper.jar b/ruoyi-modules/ruoyi-job/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..e708b1c0 Binary files /dev/null and b/ruoyi-modules/ruoyi-job/gradle/wrapper/gradle-wrapper.jar differ diff --git a/ruoyi-modules/ruoyi-job/gradle/wrapper/gradle-wrapper.properties b/ruoyi-modules/ruoyi-job/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..be52383e --- /dev/null +++ b/ruoyi-modules/ruoyi-job/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/ruoyi-modules/ruoyi-job/gradlew b/ruoyi-modules/ruoyi-job/gradlew new file mode 100755 index 00000000..4f906e0c --- /dev/null +++ b/ruoyi-modules/ruoyi-job/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/ruoyi-modules/ruoyi-job/gradlew.bat b/ruoyi-modules/ruoyi-job/gradlew.bat new file mode 100644 index 00000000..107acd32 --- /dev/null +++ b/ruoyi-modules/ruoyi-job/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/ruoyi-modules/ruoyi-job/settings.gradle b/ruoyi-modules/ruoyi-job/settings.gradle new file mode 100644 index 00000000..92121666 --- /dev/null +++ b/ruoyi-modules/ruoyi-job/settings.gradle @@ -0,0 +1,5 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +rootProject.name = 'ruoyi-modules-job' diff --git a/ruoyi-modules/ruoyi-system/build.gradle b/ruoyi-modules/ruoyi-system/build.gradle index 83c8c277..50a99d0e 100644 --- a/ruoyi-modules/ruoyi-system/build.gradle +++ b/ruoyi-modules/ruoyi-system/build.gradle @@ -1,18 +1,51 @@ +buildscript { + repositories { + maven { url "https://plugins.gradle.org/m2/" } + } + ext { + springBoot = "2.4.0" + alibabaCloud = "2.2.3.RELEASE" + springCloud = "2.2.6.RELEASE" + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBoot}") + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0" + } +} + +ext { + devVersion = "dev-9-SNAPSHOT" +} + +apply from: "../../build-config/build-all.gradle" apply from: "../../build-config/build-base.gradle" apply from: "../../build-config/build-boot-jar.gradle" -apply from: "../../build-product.gradle" - +group = "com.ruoyi" +archivesBaseName = "${project.name}" +description = 'ruoyi-modules-system' dependencies { + implementation "com.ruoyi:ruoyi-common-core:${devVersion}" + implementation "com.ruoyi:ruoyi-common-log:${devVersion}" + implementation "com.ruoyi:ruoyi-common-security:${devVersion}" + implementation "com.ruoyi:ruoyi-common-redis:${devVersion}" + implementation "com.ruoyi:ruoyi-common-datascope:${devVersion}" + implementation "com.ruoyi:ruoyi-common-swagger:${devVersion}" + implementation "com.ruoyi:ruoyi-api-system:${devVersion}" - implementation project(':ruoyi-common-datascope') - implementation project(':ruoyi-common-log') - implementation project(':ruoyi-common-core') - implementation project(':ruoyi-common-swagger') - implementation project(':ruoyi-common-security') - implementation project(':ruoyi-api-system') - implementation project(':ruoyi-common-redis') + implementation "org.apache.poi:poi-ooxml:4.1.2" + implementation 'mysql:mysql-connector-java:8.0.21' + implementation "io.springfox:springfox-swagger-ui:2.9.2" + implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.4" + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-actuator:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-validation:${springBoot}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:${alibabaCloud}" } -description = 'ruoyi-modules-system' +static def getGitVersion() { + return System.getProperty("gitVersion") ?: "git rev-parse --short HEAD".execute().text.trim() +} diff --git a/ruoyi-modules/ruoyi-system/gradle/wrapper/gradle-wrapper.jar b/ruoyi-modules/ruoyi-system/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..e708b1c0 Binary files /dev/null and b/ruoyi-modules/ruoyi-system/gradle/wrapper/gradle-wrapper.jar differ diff --git a/ruoyi-modules/ruoyi-system/gradle/wrapper/gradle-wrapper.properties b/ruoyi-modules/ruoyi-system/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..be52383e --- /dev/null +++ b/ruoyi-modules/ruoyi-system/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/ruoyi-modules/ruoyi-system/gradlew b/ruoyi-modules/ruoyi-system/gradlew new file mode 100755 index 00000000..4f906e0c --- /dev/null +++ b/ruoyi-modules/ruoyi-system/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/ruoyi-modules/ruoyi-system/gradlew.bat b/ruoyi-modules/ruoyi-system/gradlew.bat new file mode 100644 index 00000000..107acd32 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/ruoyi-modules/ruoyi-system/settings.gradle b/ruoyi-modules/ruoyi-system/settings.gradle new file mode 100644 index 00000000..482f566b --- /dev/null +++ b/ruoyi-modules/ruoyi-system/settings.gradle @@ -0,0 +1,5 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +rootProject.name = 'ruoyi-modules-system' diff --git a/ruoyi-visual/ruoyi-monitor/build.gradle b/ruoyi-visual/ruoyi-monitor/build.gradle index 2efffc91..b4b5b429 100644 --- a/ruoyi-visual/ruoyi-monitor/build.gradle +++ b/ruoyi-visual/ruoyi-monitor/build.gradle @@ -1,11 +1,45 @@ +buildscript { + repositories { + maven { url "https://plugins.gradle.org/m2/" } + } + ext { + springBoot = "2.4.0" + alibabaCloud = "2.2.3.RELEASE" + springCloud = "2.2.6.RELEASE" + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBoot}") + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0" + } +} + +ext { + devVersion = "dev-9-SNAPSHOT" +} + +description = "ruoyi-visual-monitor" +apply from: "../../build-config/build-all.gradle" apply from: "../../build-config/build-base.gradle" apply from: "../../build-config/build-boot-jar.gradle" -apply from: "../../build-product.gradle" +group = "com.ruoyi" +archivesBaseName = "${project.name}" dependencies { - implementation project(':ruoyi-common-core') + + implementation "de.codecentric:spring-boot-admin-starter-server:2.3.0" + + implementation "org.springframework.boot:spring-boot-starter-web:${springBoot}" + implementation "org.springframework.boot:spring-boot-starter-security:${springBoot}" + + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:${alibabaCloud}" + implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:${alibabaCloud}" + } -description = 'ruoyi-visual-monitor' + +static def getGitVersion() { + return System.getProperty("gitVersion") ?: "git rev-parse --short HEAD".execute().text.trim() +} diff --git a/ruoyi-visual/ruoyi-monitor/formart.sh b/ruoyi-visual/ruoyi-monitor/formart.sh new file mode 120000 index 00000000..48bef4b9 --- /dev/null +++ b/ruoyi-visual/ruoyi-monitor/formart.sh @@ -0,0 +1 @@ +../../build-config/formart.sh \ No newline at end of file diff --git a/ruoyi-visual/ruoyi-monitor/gradle/wrapper/gradle-wrapper.jar b/ruoyi-visual/ruoyi-monitor/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..e708b1c0 Binary files /dev/null and b/ruoyi-visual/ruoyi-monitor/gradle/wrapper/gradle-wrapper.jar differ diff --git a/ruoyi-visual/ruoyi-monitor/gradle/wrapper/gradle-wrapper.properties b/ruoyi-visual/ruoyi-monitor/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..be52383e --- /dev/null +++ b/ruoyi-visual/ruoyi-monitor/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/ruoyi-visual/ruoyi-monitor/gradlew b/ruoyi-visual/ruoyi-monitor/gradlew new file mode 100755 index 00000000..4f906e0c --- /dev/null +++ b/ruoyi-visual/ruoyi-monitor/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/ruoyi-visual/ruoyi-monitor/gradlew.bat b/ruoyi-visual/ruoyi-monitor/gradlew.bat new file mode 100644 index 00000000..107acd32 --- /dev/null +++ b/ruoyi-visual/ruoyi-monitor/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/ruoyi-visual/ruoyi-monitor/settings.gradle b/ruoyi-visual/ruoyi-monitor/settings.gradle new file mode 100644 index 00000000..8cf2ac56 --- /dev/null +++ b/ruoyi-visual/ruoyi-monitor/settings.gradle @@ -0,0 +1,5 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +rootProject.name = 'ruoyi-visual-monitor' diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 4aa1e509..00000000 --- a/settings.gradle +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file was generated by the Gradle 'init' task. - */ - -rootProject.name = 'ruoyi' - -include(':ruoyi-modules-job') -include(':ruoyi-common') -include(':ruoyi-common-swagger') -include(':ruoyi-api-system') -include(':ruoyi-common-log') -include(':ruoyi-common-datascope') -include(':ruoyi-api') -include(':ruoyi-modules') -include(':ruoyi-common-redis') -include(':ruoyi-visual-monitor') -include(':ruoyi-visual') -include(':ruoyi-modules-file') -include(':ruoyi-modules-gen') -include(':ruoyi-common-core') -include(':ruoyi-auth') -include(':ruoyi-common-security') -include(':ruoyi-gateway') -include(':ruoyi-modules-system') -project(":ruoyi-modules-job").projectDir = file('.') -project(":ruoyi-modules-job").projectDir = file('ruoyi-modules/ruoyi-job') -project(":ruoyi-common-swagger").projectDir = file('ruoyi-common/ruoyi-common-swagger') -project(":ruoyi-api-system").projectDir = file('ruoyi-api/ruoyi-api-system') -project(":ruoyi-common-log").projectDir = file('ruoyi-common/ruoyi-common-log') -project(":ruoyi-common-datascope").projectDir = file('ruoyi-common/ruoyi-common-datascope') -project(":ruoyi-common-redis").projectDir = file('ruoyi-common/ruoyi-common-redis') -project(":ruoyi-visual-monitor").projectDir = file('ruoyi-visual/ruoyi-monitor') -project(":ruoyi-modules-file").projectDir = file('ruoyi-modules/ruoyi-file') -project(":ruoyi-modules-gen").projectDir = file('ruoyi-modules/ruoyi-gen') -project(":ruoyi-common-core").projectDir = file('ruoyi-common/ruoyi-common-core') -project(":ruoyi-common-security").projectDir = file('ruoyi-common/ruoyi-common-security') -project(":ruoyi-modules-system").projectDir = file('ruoyi-modules/ruoyi-system')