Skip to content

Commit

Permalink
Use gradle-intellij-plugin
Browse files Browse the repository at this point in the history
* Plus a small fix to the artifact pattern

Signed-off-by: Eddie Ringle <[email protected]>
  • Loading branch information
EddieRingle committed Jul 27, 2018
1 parent 58076e3 commit 68f1588
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.gradle.api.internal.artifacts.repositories.DefaultIvyArtifactRepository

buildscript {
ext.ver = [
kotlin: "1.2.51",
Expand All @@ -10,6 +12,10 @@ buildscript {
}
}

plugins {
id "org.jetbrains.intellij" version "0.3.5"
}

apply plugin: "idea"
apply plugin: "kotlin"

Expand All @@ -23,10 +29,26 @@ version "1.0.0"
def clionPath = getCLionPath()

dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:${ver.kotlin}"
implementation "org.jetbrains.kotlin:kotlin-stdlib:${ver.kotlin}"
implementation "org.jetbrains.plugins:org.asciidoctor.intellij.asciidoc:0.20.6"
}

compileOnly fileTree(dir: "${clionPath}/lib", include: ["*.jar"])
compileOnly fileTree(dir: "lib/asciidoctor-intellij/lib", include: ["asciidoctor-intellij.jar"])
intellij {
pluginName "clion-cmakedocs"
plugins = ["org.asciidoctor.intellij.asciidoc:0.20.6"]
localPath clionPath
alternativeIdePath clionPath
ideaDependencyCachePath = file("deps").absolutePath
afterEvaluate {
project.repositories.forEach { repo ->
if (repo instanceof DefaultIvyArtifactRepository) {
if (repo.name.equals("ivy2")) {
repo.artifactPattern(
"${gradle.gradleUserHomeDir}/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/plugins.jetbrains.com/[module]-[revision]/[artifact](.[ext])")
}
}
}
}
}

task(verifySetup) {
Expand Down
Binary file not shown.

0 comments on commit 68f1588

Please sign in to comment.