Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Feb 21, 2024
2 parents c67a601 + 09c934c commit 282d377
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 53 deletions.
86 changes: 43 additions & 43 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ plugins {
id 'java-library'
id 'antlr'
id 'maven-publish'
id 'signing'
// https://plugins.gradle.org/plugin/com.palantir.revapi
id 'com.palantir.revapi' version '1.7.0'
// https://plugins.gradle.org/plugin/org.fulib.fulibGradle
Expand All @@ -44,56 +45,55 @@ repositories {
mavenCentral()
}

nexusPublishing {
repositories {
sonatype()
}
nexusPublishing.repositories.sonatype()

java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
name = project.name
description = project.description
url = 'https://github.com/fujaba/fulib'
inceptionYear = '2018'

scm {
url = 'https://github.com/fujaba/fulib'
}

licenses {
license {
name = 'MIT License'
url = 'https://www.opensource.org/licenses/mit-license.php'
}
}

developers {
developer {
id = 'zuendorf'
name = 'Albert Zuendorf'
}
developer {
id = 'digitalhoax'
name = 'Tobias George'
}
developer {
id = 'eicke123'
name = 'Christoph Eickhoff'
}
developer {
id = 'Clashsoft'
name = 'Adrian Kunz'
}
}
publishing.publications.create('mavenJava', MavenPublication) {
it.from(components.java)
it.pom {
name = project.name
description = project.description
url = 'https://github.com/fujaba/fulib'
inceptionYear = '2018'

scm {
url = 'https://github.com/fujaba/fulib'
}

licenses {
license {
name = 'MIT License'
url = 'https://www.opensource.org/licenses/mit-license.php'
}
}

developers {
developer {
id = 'zuendorf'
name = 'Albert Zuendorf'
}
developer {
id = 'digitalhoax'
name = 'Tobias George'
}
developer {
id = 'eicke123'
name = 'Christoph Eickhoff'
}
developer {
id = 'Clashsoft'
name = 'Adrian Kunz'
}
}
}
}

signing.sign publishing.publications.mavenJava

dependencies {
// https://mvnrepository.com/artifact/org.fulib/fulibScenarios
fulibScenarios group: 'org.fulib', name: 'fulibScenarios', version: '1.7.0'
Expand Down
19 changes: 19 additions & 0 deletions docs/sdmlib-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Migrating from SDMLib

SDMLib syntax can be migrated to fulib decorator syntax with a few regular expressions:

> The examples assume a `ClassModelManager model` parameter.
```regexp
(\w+).(with|create)Attribute\(
model.haveAttribute($1,
(\w+).(with|create)UniDirectional\((\w+), "(\w+)", (ONE|MANY)\)
model.associate($1, "$3", $4, $2, null, 0)
(\w+).(with|create)Bidirectional\((\w+), "(\w+)", (ONE|MANY), "(\w+)", (ONE|MANY)\)
model.associate($1, "$3", $4, $2, "$5", $6)
\)\.withSuperClazz\(
,
```
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-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
14 changes: 5 additions & 9 deletions src/main/java/org/fulib/util/AbstractGenerator4ClassFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,12 @@ public STGroup getSTGroup(String origFileName)

private STGroup loadSTGroup(String origFileName)
{
STGroup group;
try
STGroup group = new STGroupFile(origFileName);
if (this.customTemplatesFile != null)
{
group = new STGroupFile(this.customTemplatesFile);
STGroup origGroup = new STGroupFile(origFileName);
group.importTemplates(origGroup);
}
catch (Exception e)
{
group = new STGroupFile(origFileName);
final STGroup custom = new STGroupFile(this.customTemplatesFile);
custom.importTemplates(group);
group = custom;
}
group.registerRenderer(String.class, new FulibStringRenderer());
return group;
Expand Down

0 comments on commit 282d377

Please sign in to comment.