Skip to content

Commit

Permalink
Merge pull request #4 from GoodforGod/dev
Browse files Browse the repository at this point in the history
[0.17.1]
  • Loading branch information
GoodforGod authored Apr 6, 2022
2 parents 75a6d71 + 0910f00 commit ee0f989
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Java 11+ is supported.

[**Gradle**](https://mvnrepository.com/artifact/io.goodforgod/graalvm-hint-processor)
```groovy
annotationProcessor "io.goodforgod:graalvm-hint-processor:0.17.0"
compilyOnly "io.goodforgod:graalvm-hint-annotations:0.17.0"
annotationProcessor "io.goodforgod:graalvm-hint-processor:0.17.1"
compilyOnly "io.goodforgod:graalvm-hint-annotations:0.17.1"
```

[**Maven**](https://mvnrepository.com/artifact/io.goodforgod/graalvm-hint-processor)
Expand All @@ -33,14 +33,14 @@ compilyOnly "io.goodforgod:graalvm-hint-annotations:0.17.0"
<dependency>
<groupId>io.goodforgod</groupId>
<artifactId>graalvm-hint-annotations</artifactId>
<version>0.17.0</version>
<version>0.17.1</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.goodforgod</groupId>
<artifactId>graalvm-hint-processor</artifactId>
<version>0.17.0</version>
<version>0.17.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -58,7 +58,7 @@ compilyOnly "io.goodforgod:graalvm-hint-annotations:0.17.0"
<path>
<groupId>io.goodforgod</groupId>
<artifactId>graalvm-hint-processor</artifactId>
<version>0.17.0</version>
<version>0.17.1</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion graalvm-hint-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ publishing {
pom {
name = "GraalVM Hint Processor"
url = "https://github.com/GoodforGod/$artifactRootId"
description = "GraalVM Hint Processor helps generate GraalVM hints for building native-image applications"
description = "GraalVM Hint Processor that generates GraalVM configuration hints for native-image applications."

license {
name = "Apache License 2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,23 +139,29 @@ private String getPackage(Element element) {
final Element enclosingElement = element.getEnclosingElement();
if (enclosingElement instanceof PackageElement) {
final String typeName = ((PackageElement) enclosingElement).getQualifiedName().toString();
return (typeName.contains("."))
? typeName.substring(0, typeName.lastIndexOf('.'))
: typeName;
} else {
return DEFAULT_GROUP;
// class without package declare: unnamed package
if (!typeName.isEmpty()) {
return (typeName.contains("."))
? typeName.substring(0, typeName.lastIndexOf('.'))
: typeName;
}
}

return DEFAULT_GROUP;
}

private String getArtifact(Element element) {
final Element enclosingElement = element.getEnclosingElement();
if (enclosingElement instanceof PackageElement) {
final String typeName = ((PackageElement) enclosingElement).getQualifiedName().toString();
return (typeName.contains("."))
? typeName.substring(typeName.lastIndexOf('.') + 1)
: DEFAULT_ARTIFACT;
} else {
return DEFAULT_ARTIFACT;
// class without package declare: unnamed package
if (!typeName.isEmpty()) {
return (typeName.contains("."))
? typeName.substring(typeName.lastIndexOf('.') + 1)
: DEFAULT_ARTIFACT;
}
}

return DEFAULT_ARTIFACT;
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
groupId=io.goodforgod
artifactRootId=graalvm-hint
artifactVersion=0.17.0
artifactVersion=0.17.1


##### GRADLE #####
Expand Down

0 comments on commit ee0f989

Please sign in to comment.