Skip to content

Commit

Permalink
Merge pull request #8 from 2BAB/dev
Browse files Browse the repository at this point in the history
Minor bug fixes and release 2.0.1
  • Loading branch information
2BAB authored May 12, 2022
2 parents e1510c0 + 2d35233 commit 63f3df9
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 28 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Aggregate Kotlin Symbols based on KSP for multi-modules development in compile-t
// Add `mavenCentral` to `pluginManagement{}` on settings.gradle.kts,
// and koncat plugins ids.
pluginManagement {
val koncatVer = "2.0.0"
val koncatVer = "2.0.1"
repositories {
...
mavenCentral()
Expand All @@ -39,7 +39,7 @@ buildscript {
}
dependencies {
...
classpath("me.2bab:koncat-gradle-plugin:2.0.0")
classpath("me.2bab:koncat-gradle-plugin:2.0.1")
}
}
```
Expand Down Expand Up @@ -131,6 +131,7 @@ startKoin {
}
```

Check more on [here](./sample/app/src/main/kotlin/me/xx2bab/koncat/sample).

**0x04. (Optional) Custom the Koncat final class generation:**

Expand Down Expand Up @@ -196,6 +197,7 @@ class ExtensionProcessor(
+ Call `resolve()` to get the real `KoncatProcMetadata` object.
+ Pass the built-in `dependency` to `Dependencies(...)`

Check more on [here](./sample/custom-processor/src/main/kotlin/me/xx2bab/koncat/sample/kotlin).

## Compatible

Expand Down
2 changes: 1 addition & 1 deletion deps.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
koncatVer = "2.0.0"
koncatVer = "2.0.1"
kotlinVer = "1.6.21"
agpVer = "7.1.3"
agpBetaVer = "7.2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,108 +5,108 @@ import me.xx2bab.koncat.api.KoncatProcMetadata

open class KSVisitorWithExportMetadata : KSVisitor<KoncatProcMetadata, Unit> {
override fun visitAnnotated(annotated: KSAnnotated, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitAnnotation(annotation: KSAnnotation, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitCallableReference(reference: KSCallableReference, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitClassDeclaration(classDeclaration: KSClassDeclaration, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitClassifierReference(reference: KSClassifierReference, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitDeclaration(declaration: KSDeclaration, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitDeclarationContainer(
declarationContainer: KSDeclarationContainer,
data: KoncatProcMetadata
) {
TODO("Not yet implemented")

}

override fun visitDynamicReference(reference: KSDynamicReference, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitFile(file: KSFile, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitFunctionDeclaration(function: KSFunctionDeclaration, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitModifierListOwner(
modifierListOwner: KSModifierListOwner,
data: KoncatProcMetadata
) {
TODO("Not yet implemented")

}

override fun visitNode(node: KSNode, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitParenthesizedReference(
reference: KSParenthesizedReference,
data: KoncatProcMetadata
) {
TODO("Not yet implemented")

}

override fun visitPropertyAccessor(accessor: KSPropertyAccessor, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitPropertyDeclaration(property: KSPropertyDeclaration, data: KoncatProcMetadata) {
// TODO("Not yet implemented")
//
}

override fun visitPropertyGetter(getter: KSPropertyGetter, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitPropertySetter(setter: KSPropertySetter, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitReferenceElement(element: KSReferenceElement, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitTypeAlias(typeAlias: KSTypeAlias, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitTypeArgument(typeArgument: KSTypeArgument, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitTypeParameter(typeParameter: KSTypeParameter, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitTypeReference(typeReference: KSTypeReference, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitValueArgument(valueArgument: KSValueArgument, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}

override fun visitValueParameter(valueParameter: KSValueParameter, data: KoncatProcMetadata) {
TODO("Not yet implemented")

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ class ClassTypeSubProcessor(
val targetClassTypeDeclarations = koncat.getTargetClassTypes().map {
ClassNameAndType(
it,
try {
resolver.getClassDeclarationByName(it)!!.asStarProjectedType()
} catch (e: NullPointerException) {
logger.error("${koncat.projectName} can not resolve $it from classpath.")
throw e
}
) // May throw exceptions if the classpath of target class types are not existed.
}
resolver.getNewFiles().forEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ class PropertyTypeSubProcessor(
val targetPropTypeDeclarations = koncat.getTargetPropertyTypes().map {
ClassNameAndType(
it,
resolver.getClassDeclarationByName(it)!!.asStarProjectedType()
try {
resolver.getClassDeclarationByName(it)!!.asStarProjectedType()
} catch (e: NullPointerException) {
logger.error("${koncat.projectName} can not resolve $it from classpath.")
throw e
}
) // May throw exceptions
}
resolver.getNewFiles().forEach {
Expand Down

0 comments on commit 63f3df9

Please sign in to comment.