Skip to content

Commit

Permalink
Merge pull request #32 from GoodforGod/dev
Browse files Browse the repository at this point in the history
[3.1.0]
  • Loading branch information
GoodforGod authored Dec 5, 2021
2 parents fdff8eb + 4e4d79f commit 190625c
Show file tree
Hide file tree
Showing 272 changed files with 1,283 additions and 1,064 deletions.
41 changes: 22 additions & 19 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: Java CI

on:
on:
push:
branches:
- master
- dev
schedule:
- cron: "0 12 1 * *"
- master
pull_request:
branches:
- master
- dev
- master
- dev

jobs:
build:
Expand All @@ -21,18 +18,24 @@ jobs:
name: Java ${{ matrix.java }} setup

steps:
- uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v1
- uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v1

with:
java-version: ${{ matrix.java }}
with:
java-version: ${{ matrix.java }}

- name: Build with Gradle
run: ./gradlew build jacocoTestReport
- name: Build
run: ./gradlew classes

- name: Analyze with SonarQube
run: ./gradlew sonarqube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Codestyle
run: ./gradlew spotlessCheck

- name: Test
run: ./gradlew test jacocoTestReport

- name: SonarQube
run: ./gradlew sonarqube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
19 changes: 15 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
.idea
*.iml
out
# Package Files #
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

### Gradle template
.gradle
target
build/

# Idea generatted files
.idea
/out/
*.iml
.settings/
37 changes: 2 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Documentation for **versions 1.X.X** in [this document](/README-VERSION-1.X.md).
**Gradle**
```groovy
dependencies {
compile 'com.github.goodforgod:dummymaker:3.0.2'
implementation 'com.github.goodforgod:dummymaker:3.1.0'
}
```

Expand All @@ -27,7 +27,7 @@ dependencies {
<dependency>
<groupId>com.github.goodforgod</groupId>
<artifactId>dummymaker</artifactId>
<version>3.0.2</version>
<version>3.1.0</version>
</dependency>
```

Expand Down Expand Up @@ -459,39 +459,6 @@ public @interface GenInteger {
In case you want custom annotation for simple generator you can do it as well,
just use *@PrimeGen* instead of *@ComplexGen* to mark your annotation.


## Version History

**3.0.2** - OSX ResourceScanner path fixed, dependencies updated.

**3.0.1** - Minor bug fixes.

**3.0.0** - Exporters redesigned, Factory export huge amount of dummies contracts added, generators improved, matching for generators improved.

**2.2.0** - More generators, improved pattern matching, Javax CDI annotations added.

**2.1.0** - Lambda generator *GenRule* configuration added, some default generators added, minor improvements.

**2.0.2** - @GenTime export formatter added and export as unix time, SqlExporter fixed issue with INSERT queries.

**2.0.0** - Redesign factory and contracts, improved complex and other generators, GenRules added for configuration without annotations, @Ignore annotation, @GenEnum enum generation, minor improvements and more.

**1.1.3** - Embedded objects in arrays, collections full support, collections\arrays embedded depth support, Json & SQL exporters arrays & collections support.

**1.1.2** - Full primitive support, single or two dimension array support, jsonExporter collection, map, array support.

**1.1.1** - Factory performance improvements (about 40%), *GenAuto* annotation, *IComplexGenerator* the successor of *IGenerateFactory*, primitive support, Embedded multi level depth support, bug fixes.

**1.1.0** - Performance and architecture improvements, *IGenerateFactory* introduced, collection *Gen* annotations, time *Gen* annotations, Embedded *Gen* support, architecture improvements in custom user extension support.

**1.0.3** - Lots of tests for all functionality, Added *DataTypeMap* parameter for users in SqlExporter (expandable data type for sql), *NamingStrategy* for exporters, bug fixes.

**1.0.2** - Added special *GenRenameExport* annotation, export as single string, export values order fix, minor fixes and improvements.

**1.0.1** - Added new generator and annotations, special *GenEnumerate* annotation, other minor fixes (Like SQL export).

**1.0.0** - Initial project with core functions.

## License

This project licensed under the MIT - see the [LICENSE](LICENSE) file for details.
117 changes: 58 additions & 59 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,73 +1,61 @@
plugins {
id 'jacoco'
id 'java-library'
id 'maven-publish'
id "jacoco"
id "maven-publish"
id "java-library"

id 'org.sonarqube' version '3.0'
id 'com.diffplug.gradle.spotless' version '4.4.0'
id "org.sonarqube" version "3.3"
id "com.diffplug.spotless" version "5.14.3"
}

group = groupId
version = artifactVersion

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

spotless {
java {
encoding 'UTF-8'
encoding("UTF-8")
importOrder()
removeUnusedImports()
eclipse().configFile "${projectDir}/config/codestyle.xml"
eclipse().configFile("${projectDir}/config/codestyle.xml")
}
}

sonarqube {
properties {
property 'sonar.host.url', 'https://sonarcloud.io'
property 'sonar.organization', 'goodforgod'
property 'sonar.projectKey', 'GoodforGod_dummymaker'
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.organization", "goodforgod"
property "sonar.projectKey", "GoodforGod_dummymaker"
}
}

repositories {
mavenLocal()
mavenCentral()
jcenter()
}

dependencies {
implementation 'org.jetbrains:annotations:20.1.0'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'me.xdrop:fuzzywuzzy:1.3.1'
implementation 'javax.inject:javax.inject:1'
implementation "org.jetbrains:annotations:22.0.0"
implementation "org.slf4j:slf4j-api:1.7.32"
implementation "javax.inject:javax.inject:1"

testRuntimeOnly 'ch.qos.logback:logback-classic:1.2.3'
testImplementation 'junit:junit:4.13'
testRuntimeOnly "ch.qos.logback:logback-classic:1.2.7"
testImplementation "junit:junit:4.13.2"
}

test {
useJUnit()
testLogging {
events 'passed', 'skipped', 'failed'
exceptionFormat 'full'
showStandardStreams = false
events("passed", "skipped", "failed")
exceptionFormat("full")
showStandardStreams(false)
}
}

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.incremental = true
options.fork = true
}

tasks.withType(Test) {
reports.html.enabled = false
reports.junitXml.enabled = false
}

java {
withJavadocJar()
withSourcesJar()
reports {
html.enabled(false)
junitXml.enabled(false)
}
}

publishing {
Expand All @@ -76,27 +64,27 @@ publishing {
from components.java

pom {
name = 'DummyMaker'
url = 'https://github.com/GoodforGod/dummymaker'
description = 'Library can fill Java Classes with random data and also export data in CSV/JSON/XML/SQL formats'
name = "DummyMaker"
url = "https://github.com/GoodforGod/dummymaker"
description = "Library can fill Java Classes with random data and also export data in CSV/JSON/XML/SQL formats"

license {
name = 'MIT License'
url = 'https://github.com/GoodforGod/dummymaker/blob/master/LICENSE'
distribution = 'repo'
name = "MIT License"
url = "https://github.com/GoodforGod/dummymaker/blob/master/LICENSE"
distribution = "repo"
}

developer {
id = 'GoodforGod'
name = 'Anton Kurako'
email = '[email protected]'
url = 'https://github.com/GoodforGod'
id = "GoodforGod"
name = "Anton Kurako"
email = "[email protected]"
url = "https://github.com/GoodforGod"
}

scm {
connection = 'scm:git:git://github.com/GoodforGod/dummymaker.git'
developerConnection = 'scm:git:ssh://GoodforGod/dummymaker.git'
url = 'https://github.com/GoodforGod/dummymaker/tree/master'
connection = "scm:git:git://github.com/GoodforGod/dummymaker.git"
developerConnection = "scm:git:ssh://GoodforGod/dummymaker.git"
url = "https://github.com/GoodforGod/dummymaker/tree/master"
}
}
}
Expand All @@ -106,7 +94,7 @@ publishing {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username System.getenv("OSS_USERNAME")
password System.getenv("OSS_PASSWORD")
Expand All @@ -115,6 +103,17 @@ publishing {
}
}

java {
withJavadocJar()
withSourcesJar()
}

tasks.withType(JavaCompile) {
options.encoding("UTF-8")
options.incremental(true)
options.fork = true
}

check.dependsOn jacocoTestReport
jacocoTestReport {
reports {
Expand All @@ -123,16 +122,16 @@ jacocoTestReport {
}
}

javadoc {
options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption("html5", true)
}
}

if (project.hasProperty("signing.keyId")) {
apply plugin: 'signing'
apply plugin: "signing"
signing {
sign publishing.publications.mavenJava
}
}

javadoc {
options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
2 changes: 1 addition & 1 deletion config/codestyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="100"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
Expand Down
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
groupId=com.github.goodforgod
artifactId=dummymaker
artifactVersion=3.0.2
artifactVersion=3.1.0


##### GRADLE
##### GRADLE #####
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ case "`uname`" in
Darwin* )
darwin=true
;;
MINGW* )
MSYS* | MINGW* )
msys=true
;;
NONSTOP* )
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/io/dummymaker/annotation/complex/GenArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.dummymaker.annotation.core.ComplexGen;
import io.dummymaker.generator.IGenerator;
import io.dummymaker.generator.complex.ArrayComplexGenerator;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down Expand Up @@ -35,7 +34,7 @@
*
* @return max amount
*/
int max() default 10;
int max() default 2;

/**
* Fixed number entities to generate Turned off by default
Expand Down
Loading

0 comments on commit 190625c

Please sign in to comment.