diff --git a/.gitignore b/.gitignore
index 2eda6cf..76ca9c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,5 @@ gen
.idea/workspace.xml
.idea/misc.xml
ncore-properties-local.xml
-*.iml
\ No newline at end of file
+*.iml
+/out
\ No newline at end of file
diff --git a/.idea/artifacts/Gradle___biz_redsoft_sample___sample_1_1_1_1_SNAPSHOT_war.xml b/.idea/artifacts/Gradle___biz_redsoft_sample___sample_1_1_1_1_SNAPSHOT_war.xml
deleted file mode 100644
index 508d863..0000000
--- a/.idea/artifacts/Gradle___biz_redsoft_sample___sample_1_1_1_1_SNAPSHOT_war.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
- $PROJECT_DIR$/build/libs
-
-
- :war
- :cleanWar
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/artifacts/Gradle___biz_redsoft_sample___sample_1_1_1_1_SNAPSHOT_war__exploded_.xml b/.idea/artifacts/Gradle___biz_redsoft_sample___sample_1_1_1_1_SNAPSHOT_war__exploded_.xml
deleted file mode 100644
index 4bfa5c9..0000000
--- a/.idea/artifacts/Gradle___biz_redsoft_sample___sample_1_1_1_1_SNAPSHOT_war__exploded_.xml
+++ /dev/null
@@ -1,165 +0,0 @@
-
-
- $PROJECT_DIR$/build/libs/exploded/sample-1.1.1.1-SNAPSHOT.war
-
-
- TWFuaWZlc3QtVmVyc2lvbjogMS4wDQoNCg==
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..6ee9cd6
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..ea2f49f
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 51e227a..76fcf38 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -11,8 +11,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 0445e85..611e7c8 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -11,7 +11,6 @@
-
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index e423192..1e2bc4e 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -21,5 +21,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 002f828..7ffebf6 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -3,7 +3,7 @@
-
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/MainForm.xml b/.idea/runConfigurations/MainForm.xml
index 0d12656..3e13758 100644
--- a/.idea/runConfigurations/MainForm.xml
+++ b/.idea/runConfigurations/MainForm.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/build.gradle b/build.gradle
index fc79b54..ec64a9d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,22 +1,15 @@
-buildscript {
- repositories {
- maven { url 'http://nexus.red-soft.biz/repository/public' }
- mavenLocal()
- }
- dependencies {
- classpath 'biz.redsoft.gradle.ncore:gradle-ncore:1.2.+'
- classpath 'nu.studer:gradle-credentials-plugin:1.0.4'
- }
+plugins {
+ id 'nu.studer.credentials' version('1.0.4')
+ id 'idea'
+ id 'eclipse'
+ id 'application'
+ id 'java-library'
+ id 'war'
+ id 'gradle-ncore' version('2.9.+')
}
group = 'biz.redsoft.sample'
-apply plugin: 'nu.studer.credentials'
-apply plugin: 'idea'
-apply plugin: 'application'
-apply plugin: 'war'
-apply plugin: 'ncore'
-
targetCompatibility = 1.8
ncore {
@@ -27,22 +20,23 @@ ncore {
repositories {
mavenLocal()
maven {
- url 'http://nexus.red-soft.biz/repository/public'
+ url 'https://nexus.red-soft.ru/repository/public'
if (project.credentials.user != null && project.credentials.password != null) {
- credentials {
- username project.credentials.user
- password project.credentials.password
- }
+ credentials {
+ username project.credentials.user
+ password project.credentials.password
+ }
}
}
}
dependencies {
- provided 'javax.servlet:javax.servlet-api:3.1.0'
-
- testCompile 'org.junit.jupiter:junit-jupiter:5.8.2'
+ implementation 'javax.servlet:javax.servlet-api:3.1.0'
+ implementation 'biz.redsoft.gradle.ncore:gradle-ncore:2.9.+'
+ testCompileClasspath 'org.junit.jupiter:junit-jupiter:5.8.2'
runtimeClasspath files(ncoreGenerateControlDataJar)
runtimeClasspath files(genJar)
+ annotationProcessor 'biz.redsoft.ncore:ncoreAnnotationProcessor:1.0.+'
}
// writing build process to a log file
@@ -52,16 +46,20 @@ def buildLogDir = "${rootDir}/logs"
mkdir("${buildLogDir}")
def buildLog = new File("${buildLogDir}/${tstamp}_buildLog.log")
-import org.gradle.internal.logging.*
+
+import org.gradle.internal.logging.LoggingOutputInternal
+
+import java.util.regex.Matcher
+
System.setProperty('org.gradle.color.error', 'RED')
-gradle.services.get(LoggingOutputInternal).addStandardOutputListener (new StandardOutputListener () {
+gradle.services.get(LoggingOutputInternal).addStandardOutputListener(new StandardOutputListener() {
void onOutput(CharSequence output) {
buildLog << output
}
})
-gradle.services.get(LoggingOutputInternal).addStandardErrorListener (new StandardOutputListener () {
+gradle.services.get(LoggingOutputInternal).addStandardErrorListener(new StandardOutputListener() {
void onOutput(CharSequence output) {
buildLog << output
}
@@ -83,15 +81,38 @@ task copyDist(type: Copy) {
into "$releaseDir/$project.name/$version"
}
+def versionPropertiesFilePath = sourceSets.main.resources.srcDirs[0].toString() + File.separator + "META-INF/ncore-product/${project.group}/version.properties"
+
release {
- tagPrefix = 'v'
+ commitNewVersion.enabled(true)
+ failOnCommitNeeded = false
+ failOnPublishNeeded = true
+ failOnSnapshotDependencies = true
+ failOnUnversionedFiles = false
+ failOnUpdateNeeded = false
+ revertOnFail = true
+ preCommitText = ''
+ preTagCommitMessage = '[Gradle Release Plugin] - pre tag commit: '
+ tagCommitMessage = '[Gradle Release Plugin] - creating tag: '
+ newVersionCommitMessage = '[Gradle Release Plugin] - new version commit: '
+ tagTemplate = "${project.name}/v${version}"
+ versionPropertyFile = versionPropertiesFilePath
+ versionProperties = []
+ snapshotSuffix = '-SNAPSHOT'
+ buildTasks = ['buildRelease', 'commitNewVersion']
+ ignoredSnapshotDependencies = []
+ versionPatterns = [
+ /(\d+)(\.)(\d+)(\.)(\d+)([^\d]*\u0024)/: { Matcher m, Project p ->
+ project.getVersion().newVersion().toString()
+ }
+ ]
+ pushReleaseVersionBranch = null
}
task buildRelease(type: GradleBuild) {
tasks = ['clean', 'writeVersion', 'nbackup', 'build', 'copyDist', 'publish']
}
-idea { module.scopes.PROVIDED.plus += [configurations.provided] }
jar{
manifest{
@@ -102,6 +123,13 @@ jar{
}
}
-startScripts{
+startScripts {
project.startScripts.defaultJvmOpts = ['-Dlogback.configurationFile=./config/logback.xml']
-}
\ No newline at end of file
+}
+
+distTar {
+ duplicatesStrategy = DuplicatesStrategy.WARN
+}
+distZip {
+ duplicatesStrategy = DuplicatesStrategy.WARN
+}
diff --git a/gradle.properties b/gradle.properties
index b7a32e1..2809d68 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1 +1,3 @@
-biz.redsoft.ncore.version=1.9.+
+biz.redsoft.ncore.version=1.10.13.0
+org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index d3b8398..94336fc 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 8979c7f..ae04661 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Wed Oct 02 13:02:10 MSK 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
diff --git a/gradlew b/gradlew
index 27309d9..cccdd3d 100755
--- a/gradlew
+++ b/gradlew
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
##############################################################################
##
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
-warn ( ) {
+warn () {
echo "$*"
}
-die ( ) {
+die () {
echo
echo "$*"
echo
@@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+APP_ARGS=$(save "$@")
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+# 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/gradlew.bat b/gradlew.bat
index 832fdb6..f955316 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
diff --git a/settings.gradle b/settings.gradle
index e3718fc..5113e9b 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1,10 @@
+pluginManagement{
+ repositories {
+ gradlePluginPortal()
+ mavenCentral()
+ mavenLocal()
+ maven { url 'https://nexus.red-soft.ru/repository/public' }
+ }
+}
+
rootProject.name = 'sample'
\ No newline at end of file
diff --git a/src/main/java/biz/redsoft/sample/MainForm.java b/src/main/java/biz/redsoft/sample/MainForm.java
new file mode 100644
index 0000000..97ff2b8
--- /dev/null
+++ b/src/main/java/biz/redsoft/sample/MainForm.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2023 Red Soft Corporation.
+ *
+ * This file is part of Red nCore.
+ *
+ * Red nCore is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * Red nCore is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Red nCore; see the file COPYING. If not, write to the
+ * Red Soft Corporation, 117105, Russia, Moscow, Nagornyy proyezd, 5.
+ *
+ * Linking this library statically or dynamically with other modules is
+ * making a combined work based on this library. Thus, the terms and
+ * conditions of the GNU General Public License cover the whole
+ * combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce an
+ * executable, regardless of the license terms of these independent
+ * modules, and to copy and distribute the resulting executable under
+ * terms of your choice, provided that you also meet, for each linked
+ * independent module, the terms and conditions of the license of that
+ * module. An independent module is a module which is not derived from
+ * or based on this library. If you modify this library, you may extend
+ * this exception to your version of the library, but you are not
+ * obligated to do so. If you do not wish to do so, delete this
+ * exception statement from your version.
+ */
+
+package biz.redsoft.sample;
+
+public class MainForm extends biz.redsoft.ncore.client.MainForm {
+
+ public static void main(String[] args) throws Throwable {
+ biz.redsoft.ncore.client.MainForm.main(args);
+ }
+}