mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
fix(annotations-processors/ksp): use AutoService to register SymbolProcessorProvider
This commit is contained in:
@@ -15,16 +15,20 @@
|
||||
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import com.itsaky.androidide.build.config.BuildConfig
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
kotlin("kapt")
|
||||
}
|
||||
|
||||
group = "${BuildConfig.packageName}.annotations"
|
||||
|
||||
dependencies {
|
||||
kapt(libs.google.auto.service)
|
||||
implementation(libs.google.auto.service.annotations)
|
||||
|
||||
implementation(kotlin("stdlib"))
|
||||
|
||||
implementation(projects.annotations)
|
||||
|
||||
+1
@@ -27,6 +27,7 @@ import com.google.devtools.ksp.symbol.KSClassDeclaration
|
||||
import com.google.devtools.ksp.symbol.KSFunctionDeclaration
|
||||
import com.google.devtools.ksp.symbol.KSType
|
||||
import com.itsaky.androidide.annotations.inflater.ViewAdapter
|
||||
import com.itsaky.androidide.annotations.ksp.getKSAnnotationsByType
|
||||
import com.itsaky.androidide.annotations.uidesigner.IncludeInDesigner
|
||||
import com.squareup.javapoet.ClassName
|
||||
import com.squareup.javapoet.CodeBlock
|
||||
|
||||
+2
@@ -17,6 +17,7 @@
|
||||
|
||||
package com.itsaky.androidide.annotations.ksp.inflater
|
||||
|
||||
import com.google.auto.service.AutoService
|
||||
import com.google.devtools.ksp.processing.SymbolProcessor
|
||||
import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
|
||||
import com.google.devtools.ksp.processing.SymbolProcessorProvider
|
||||
@@ -27,6 +28,7 @@ import com.google.devtools.ksp.processing.SymbolProcessorProvider
|
||||
*
|
||||
* @author Akash Yadav
|
||||
*/
|
||||
@AutoService(SymbolProcessorProvider::class)
|
||||
class ViewAdapterSymbolProcessorProvider : SymbolProcessorProvider {
|
||||
|
||||
override fun create(environment: SymbolProcessorEnvironment): SymbolProcessor {
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.itsaky.androidide.annotations.ksp.inflater
|
||||
package com.itsaky.androidide.annotations.ksp
|
||||
|
||||
import com.google.devtools.ksp.symbol.KSAnnotated
|
||||
import com.google.devtools.ksp.symbol.KSAnnotation
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
#
|
||||
# This file is part of AndroidIDE.
|
||||
#
|
||||
# AndroidIDE is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# AndroidIDE is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
com.itsaky.androidide.annotations.ksp.inflater.ViewAdapterSymbolProcessorProvider
|
||||
Reference in New Issue
Block a user