Last active
February 11, 2018 14:46
-
-
Save bassaer/57442dd8c9fd977354153c868140a1e0 to your computer and use it in GitHub Desktop.
gradleでjarから特定のパッケージだけを取り除く ref: https://qiita.com/bassaer/items/0b1fdf4a4ba0462afed8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
ext.kotlin_version = '1.2.10' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
} | |
} | |
plugins { | |
id 'org.jetbrains.intellij' version '0.2.18' | |
} | |
group 'com.github.bassaer' | |
version '0.0.1' | |
apply plugin: 'kotlin' | |
repositories { | |
mavenCentral() | |
} | |
configurations { | |
kotlinCompiler { transitive = false } | |
} | |
dependencies { | |
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" | |
kotlinCompiler ("org.jetbrains.kotlin:kotlin-compiler:$kotlin_version") | |
compile files("$libsDir/tweaked-kotlin-compiler.jar") | |
} | |
task tweakKotlinCompiler(type: Jar) { | |
from zipTree(configurations.kotlinCompiler.singleFile).matching { | |
exclude "com/intellij/**" | |
} | |
destinationDir libsDir | |
archiveName 'tweaked-kotlin-compiler.jar' | |
} | |
compileKotlin() { | |
kotlinOptions.jvmTarget = "1.8" | |
} | |
compileTestKotlin { | |
kotlinOptions.jvmTarget = "1.8" | |
} | |
intellij { | |
version '2017.3.3' | |
} | |
patchPluginXml { | |
changeNotes """ | |
Add change notes here.<br> | |
<em>most HTML tags may be used</em>""" | |
} | |
compileKotlin.dependsOn tweakKotlinCompiler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment