Skip to content

Commit

Permalink
Merge pull request #104 from crysknife-io/v0.8_release
Browse files Browse the repository at this point in the history
release 0.8
  • Loading branch information
treblereel authored Dec 27, 2024
2 parents e5aead0 + ae831ed commit c23460e
Show file tree
Hide file tree
Showing 22 changed files with 39 additions and 51 deletions.
2 changes: 1 addition & 1 deletion annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.crysknife</groupId>
<artifactId>crysknife-parent</artifactId>
<version>0.7</version>
<version>0.8</version>
</parent>

<artifactId>crysknife-annotations</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.crysknife</groupId>
<artifactId>bom</artifactId>
<version>0.7</version>
<version>0.8</version>
<packaging>pom</packaging>


Expand Down
6 changes: 1 addition & 5 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.crysknife</groupId>
<artifactId>crysknife-parent</artifactId>
<version>0.7</version>
<version>0.8</version>
</parent>

<artifactId>crysknife-core</artifactId>
Expand Down Expand Up @@ -36,10 +36,6 @@
</organization>

<dependencies>
<dependency>
<groupId>com.google.jsinterop</groupId>
<artifactId>jsinterop-annotations</artifactId>
</dependency>
<dependency>
<groupId>io.crysknife</groupId>
<artifactId>crysknife-annotations</artifactId>
Expand Down
8 changes: 4 additions & 4 deletions demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.crysknife.demo</groupId>
<artifactId>demo</artifactId>
<version>0.7</version>
<version>0.8</version>
<packaging>jar</packaging>

<properties>
Expand All @@ -15,9 +15,9 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

<elemental2.version>1.2.1</elemental2.version>
<j2cl.maven.plugin.version>0.23.1</j2cl.maven.plugin.version>
<org.treblereel.j2cl.processors.version>0.7</org.treblereel.j2cl.processors.version>
<elemental2.version>1.2.3</elemental2.version>
<j2cl.maven.plugin.version>0.23.2</j2cl.maven.plugin.version>
<org.treblereel.j2cl.processors.version>0.8</org.treblereel.j2cl.processors.version>
</properties>

<dependencyManagement>
Expand Down
20 changes: 7 additions & 13 deletions internal-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.crysknife</groupId>
<artifactId>internal-bom</artifactId>
<version>0.7</version>
<version>0.8</version>
<packaging>pom</packaging>


Expand Down Expand Up @@ -71,18 +71,17 @@
<javax.inject.version>1</javax.inject.version>
<freemarker.version>2.3.30</freemarker.version>
<lesscss.version>1.10</lesscss.version>
<google.jsinterop.annotations.version>2.0.0</google.jsinterop.annotations.version>
<google.guava.version>28.1-jre</google.guava.version>
<classgraph.classgraph.version>4.8.156</classgraph.classgraph.version>
<org.treblereel.j2cl.processors.version>0.7</org.treblereel.j2cl.processors.version>
<gwt.jakarta.version>0.4</gwt.jakarta.version>
<org.treblereel.j2cl.processors.version>0.8</org.treblereel.j2cl.processors.version>
<gwt.jakarta.version>0.6</gwt.jakarta.version>

<javaparser.core.version>3.25.5</javaparser.core.version>
<elemental2.version>1.2.1</elemental2.version>
<auto.common.version>1.2.1</auto.common.version>
<auto.service.version>1.0-rc7</auto.service.version>
<elemental2.version>1.2.3</elemental2.version>
<auto.common.version>1.2.2</auto.common.version>
<auto.service.version>1.1.1</auto.service.version>
<mockito.core.version>4.6.1</mockito.core.version>
<junit.version>4.13.1</junit.version>
<junit.version>4.13.2</junit.version>
</properties>

<dependencyManagement>
Expand All @@ -100,11 +99,6 @@
<version>${javax.inject.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.jsinterop</groupId>
<artifactId>jsinterop-annotations</artifactId>
<version>${google.jsinterop.annotations.version}</version>
</dependency>
<dependency>
<groupId>com.google.elemental2</groupId>
<artifactId>elemental2-dom</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.crysknife</groupId>
<artifactId>crysknife-parent</artifactId>
<version>0.7</version>
<version>0.8</version>
<packaging>pom</packaging>

<name>crysknife parent</name>
Expand Down
2 changes: 1 addition & 1 deletion processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.crysknife</groupId>
<artifactId>crysknife-parent</artifactId>
<version>0.7</version>
<version>0.8</version>
</parent>

<artifactId>crysknife-processor</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private void privateMethods(BeanDefinition beanDefinition, ClassMetaInfo classMe
.methodsIn(MoreTypes.asTypeElement(beanDefinition.getType()).getEnclosedElements())
.stream().filter(method -> method.getModifiers().contains(Modifier.PRIVATE))
.filter(method -> !method.getModifiers().contains(Modifier.NATIVE))
.map(method -> j2CLUtils.createDeclarationMethodDescriptor(method).getMangledName())
.map(j2CLUtils::getMethodMangledName)
.collect(Collectors.toSet());
if (!methods.isEmpty()) {
classMetaInfo.addImport(JsType.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ public String generate(TypeMirror parent, ExecutableElement method, List<String>
if (isJre) {
root.put("name", method.getSimpleName().toString());
if (!args.isEmpty()) {
root.put("args", args.stream().collect(Collectors.joining(", ")));
root.put("args", String.join(", ", args));
}
} else {
if (isPrivate) {
root.put("name", j2CLUtils.createDeclarationMethodDescriptor(method).getMangledName());
root.put("name", j2CLUtils.getMethodMangledName(method));
} else {
root.put("name", method.getSimpleName().toString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public Expression getFieldAccessCallExpr(BeanDefinition beanDefinition, Variable
"get").addArgument(
new MethodCallExpr(new NameExpr(Reflect.class.getSimpleName()), "objectProperty")
.addArgument(
new StringLiteralExpr(j2CLUtils.createFieldDescriptor(field).getMangledName()))
new StringLiteralExpr(j2CLUtils.getVariableMangledName(field)))
.addArgument("instance"));
}

Expand Down Expand Up @@ -228,8 +228,7 @@ public Statement generateMethodCall(TypeMirror parent, ExecutableElement method,
new MethodCallExpr(new NameExpr(Reflect.class.getCanonicalName()),
"objectProperty")
.addArgument(new StringLiteralExpr(
j2CLUtils.createDeclarationMethodDescriptor(method)
.getMangledName()))
j2CLUtils.getMethodMangledName(method)))
.addArgument("instance"))),
"bind").addArgument("instance");

Expand Down Expand Up @@ -282,7 +281,7 @@ private TryStmt generatePrivateJREMethodCall(ExecutableElement method, Expressio
}

private Statement generatePrivateJ2CLMethodCall(ExecutableElement method, Expression[] args) {
String mangleName = j2CLUtils.createDeclarationMethodDescriptor(method).getMangledName();
String mangleName = j2CLUtils.getMethodMangledName(method);
TypeMirror parent =
context.getGenerationContext().getTypes().erasure(method.getEnclosingElement().asType());
String factoryName = TypeUtils.getQualifiedFactoryName(parent);
Expand Down Expand Up @@ -341,7 +340,7 @@ public Expression getFieldAccessorExpression(InjectableVariableDefinition fieldP
}

String jsFieldName =
j2CLUtils.createFieldDescriptor(fieldPoint.getVariableElement()).getMangledName();
j2CLUtils.getVariableMangledName(fieldPoint.getVariableElement());
MethodCallExpr reflect =
new MethodCallExpr(new NameExpr(Reflect.class.getSimpleName()), "objectProperty")
.addArgument(new StringLiteralExpr(jsFieldName))
Expand Down
2 changes: 1 addition & 1 deletion tests/j2cl-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.crysknife.tests</groupId>
<artifactId>j2cl-tests</artifactId>
<version>0.7</version>
<version>0.8</version>
<description>J2CL tests</description>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion tests/jre-tests/cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.crysknife.tests</groupId>
<artifactId>jre-cdi-tests</artifactId>
<version>0.7</version>
<version>0.8</version>
<packaging>jar</packaging>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion tests/jre-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>jre-parent</artifactId>
<groupId>io.crysknife.tests</groupId>
<version>0.7</version>
<version>0.8</version>
<packaging>pom</packaging>
<name>Crysknife :: Tests :: JRE</name>

Expand Down
2 changes: 1 addition & 1 deletion tests/jre-tests/reduces-classpath/app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.crysknife.tests</groupId>
<artifactId>reduces-classpath-app</artifactId>
<version>0.7</version>
<version>0.8</version>
<packaging>jar</packaging>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion tests/jre-tests/reduces-classpath/dep/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.crysknife.tests</groupId>
<artifactId>reduces-classpath-dep</artifactId>
<version>0.7</version>
<version>0.8</version>
<packaging>jar</packaging>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion tests/jre-tests/reduces-classpath/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.crysknife</groupId>
<artifactId>reduces-classpath-parent</artifactId>
<version>0.7</version>
<version>0.8</version>
<packaging>pom</packaging>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion tests/jre-tests/simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.crysknife.tests</groupId>
<artifactId>jre-simple-tests</artifactId>
<version>0.7</version>
<version>0.8</version>
<packaging>jar</packaging>

<properties>
Expand Down
4 changes: 2 additions & 2 deletions tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>io.crysknife</groupId>
<artifactId>crysknife-parent</artifactId>
<version>0.7</version>
<version>0.8</version>
</parent>

<artifactId>tests-parent</artifactId>
<groupId>io.crysknife.tests</groupId>
<version>0.7</version>
<version>0.8</version>
<packaging>pom</packaging>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion ui/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.crysknife.ui</groupId>
<artifactId>parent</artifactId>
<version>0.7</version>
<version>0.8</version>
</parent>

<artifactId>crysknife-ui-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ui/generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.crysknife.ui</groupId>
<artifactId>parent</artifactId>
<version>0.7</version>
<version>0.8</version>
</parent>

<artifactId>crysknife-ui-generator</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private void maybeHasNotGetMethod(BeanDefinition beanDefinition,
if (executableElement.isPresent()) {
templateDefinition.setInitRootElement(true);
String mangledName =
j2CLUtils.createDeclarationMethodDescriptor(executableElement.get()).getMangledName();
j2CLUtils.getMethodMangledName(executableElement.get());
templateDefinition.setRootElementPropertyName(mangledName);
}
}
Expand Down Expand Up @@ -280,7 +280,7 @@ private void processDataFields(TemplateContext templateContext,
"resolveElement").addArgument(instance)
.addArgument(new StringLiteralExpr(element.getName()));
}
String mangleName = j2CLUtils.createFieldDescriptor(element.getField()).getMangledName();
String mangleName = j2CLUtils.getVariableMangledName(element.getField());
MethodCallExpr fieldSetCallExpr =
new MethodCallExpr(
new MethodCallExpr(new NameExpr(Js.class.getSimpleName()), "asPropertyMap")
Expand Down Expand Up @@ -321,8 +321,7 @@ private void processEventHandlers(BeanDefinition beanDefinition, TemplateContext
.getAnnotation(ForEvent.class).value();
String clazz = iocContext.getGenerationContext().getTypes()
.erasure(eventHandlerInfo.getMethod().getParameters().get(0).asType()).toString();
String mangleName = j2CLUtils.createFieldDescriptor(eventHandlerInfo.getInfo().getField(),
beanDefinition.getType()).getMangledName();
String mangleName = j2CLUtils.getVariableMangledName(eventHandlerInfo.getInfo().getField());
String call = methodCallGenerator.generate(beanDefinition.getType(),
eventHandlerInfo.getMethod(), List.of("e"));
Event event = new Event(eventTypes, mangleName, clazz, call);
Expand Down Expand Up @@ -530,7 +529,7 @@ public MethodCallExpr getFieldAccessCallExpr(DataElementInfo info) {
}

public MethodCallExpr getFieldAccessCallExpr(VariableElement field) {
String mangleName = j2CLUtils.createFieldDescriptor(field).getMangledName();
String mangleName = j2CLUtils.getVariableMangledName(field);

return new MethodCallExpr(
new MethodCallExpr(new NameExpr(Js.class.getSimpleName()), "asPropertyMap")
Expand Down
2 changes: 1 addition & 1 deletion ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.crysknife</groupId>
<artifactId>crysknife-parent</artifactId>
<version>0.7</version>
<version>0.8</version>
</parent>

<groupId>io.crysknife.ui</groupId>
Expand Down

0 comments on commit c23460e

Please sign in to comment.