Duplicate Dependency Gradle and Plugin when implement template plugin
Hi All,
I building a Plugin Template that refers to this,
when I run the task `runIde` then I try to implement my template. my root project `build.gradle.kts.` was added with another dependency as below
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
and also my destination module build.gradle.kts template also added by this
id("org.jetbrains.kotlin.android")
I want to exclude that dependency. this is my plugin.xml
<!-- Plugin Configuration File. Read more: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html -->
<idea-plugin>
<id>com.template.mvvm</id>
<name>Template-MVVM</name>
<vendor>Developers</vendor>
<depends>org.jetbrains.android</depends>
<depends>com.intellij.modules.androidstudio</depends>
<extensions defaultExtensionNs="com.android.tools.idea.wizard.template">
<wizardTemplateProvider implementation="com.template.mvvm.WizardTemplateProviderImpl" />
</extensions>
<applicationListeners>
<listener class="com.template.mvvm.listeners.MyProjectManagerListener"
topic="com.intellij.openapi.project.ProjectManagerListener"/>
</applicationListeners>
</idea-plugin>
this is also my gradle.properties
# IntelliJ Platform Artifacts Repositories
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
pluginGroup = com.template.mvvm
pluginName = Template-MVVM
# SemVer format -> https://semver.org
pluginVersion = 0.0.1
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild = 211
pluginUntilBuild = 213.*
# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType = IC
platformVersion = 2021.2
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins = com.intellij.java, org.jetbrains.android
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
javaVersion = 11
# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 7.4
# Opt-out flag for bundling Kotlin standard library.
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
# suppress inspection "UnusedProperty"
kotlin.stdlib.default.dependency = false
androidStudioPath = C:\\Program Files\\Android\\Android Studio
androidStudioPathMacOS = /Applications/Android Studio.app/Contents
Did I miss something here?
thanks in advance
Please sign in to leave a comment.
Hardian, I'm not sure what your problem actually is – could you please rephrase your question?
I'm sorry to make you confused,
I want to create a custom plugin template that refers to this.
then I fork the repository and create a few template class that I wanted. So I run the task `runIde` to test my template plugin inside the android studio. then apply my plugin, but whenever I implemented that. the other dependency will add to my root project build.gradle.kts as below
and also other module build.gradle.kts also added by this plugin
I want to exclude that dependency while implementing my plugin.
sorry for my bad explanation recently
thank you