Permalink
Browse files

Kotlin 1.3.10, Gradle 5.0-rc-5

  • Loading branch information...
ingokegel committed Nov 24, 2018
1 parent ce1a4eb commit 06268d1edf8093f8f188a4f609e30e6a8933a0ca
@@ -53,6 +53,7 @@
<inspection_tool class="PointlessBooleanExpression" enabled="false" level="WARNING" enabled_by_default="false">
<option name="m_ignoreExpressionsContainingConstants" value="false" />
</inspection_tool>
<inspection_tool class="RedundantStringOperationMerged" />
<inspection_tool class="RefusedBequest" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreEmptySuperMethods" value="false" />
</inspection_tool>
@@ -82,6 +83,7 @@
<inspection_tool class="UnnecessarySemicolon" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnnecessaryTemporaryOnConversionFromString" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnnecessaryTemporaryOnConversionToString" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnusedLabel" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnusedParameters" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnusedReturnValue" enabled="false" level="WARNING" enabled_by_default="false" />
@@ -10,8 +10,7 @@ plugins {
version = "5.3"
buildDir = file("build/gradle")

var mediaDir: File by extra(file("media"))
var externalLibsDir: File by extra(file("$buildDir/externalLibs"))
val kotlinVersion: String by project

subprojects {

@@ -28,24 +27,25 @@ subprojects {
maven("http://maven.ej-technologies.com/repository")
}

plugins.withId("kotlin") {
pluginManager.withPlugin("kotlin") {
dependencies {
add("compile", kotlin("stdlib", version = kotlinVersion))
add("testCompile", "org.testng:testng:6.8.8")
}

tasks.withType<JavaCompile> {
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}

tasks.withType<Test> {
tasks.withType<Test>().configureEach {
useTestNG()
}

tasks.withType<KotlinJvmCompile> {
tasks.withType<KotlinJvmCompile>().configureEach {
kotlinOptions {
languageVersion = "1.2"
apiVersion = "1.2"
languageVersion = "1.3"
apiVersion = "1.3"
jvmTarget = "1.8"
}
}
@@ -54,18 +54,17 @@ subprojects {

tasks {
getByName<Wrapper>("wrapper") {
gradleVersion = "4.10.1"
gradleVersion = "5.0-rc-5"
distributionType = Wrapper.DistributionType.ALL
}

register("dist") {
dependsOn(":data:dist", ":browser:dist")
}

register("clean") {
doLast {
delete(externalLibsDir)
}
register<Delete>("clean") {
dependsOn(":installer:clean", ":data:clean", ":browser:clean")
delete(externalLibsDir)
}
}

@@ -14,5 +14,5 @@ dependencies {
// for local dokka in lib-compile
//classpath ':dokka-fatjar'
//classpath ':dokka-gradle-plugin'
"compile"("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1")
"compile"("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4")
}
@@ -1,5 +1,3 @@
@file:Suppress("UnusedImport")

import com.jfrog.bintray.gradle.BintrayExtension
import com.jfrog.bintray.gradle.tasks.BintrayUploadTask
import org.gradle.api.Project
@@ -8,6 +6,9 @@ import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.*
import java.io.File

val Project.externalLibsDir: File get() = file("${rootProject.buildDir}/externalLibs")

fun Project.configurePublishing() {
pluginManager.apply("com.jfrog.bintray")
@@ -24,7 +25,7 @@ fun Project.configurePublishing() {
}
}

val sourcesJar by creating(Jar::class) {
val sourcesJar by registering(Jar::class) {
classifier = "sources"
from(project.the<JavaPluginConvention>().sourceSets["main"].allSource)
}
@@ -38,7 +39,7 @@ fun Project.configurePublishing() {
create<MavenPublication>("Module") {
from(project.components["java"])
artifactId = "jclasslib-${project.name}"
artifact(sourcesJar)
artifact(sourcesJar.get())
pom {
licenses {
license {
@@ -1 +1 @@
kotlinVersion=1.2.70
kotlinVersion=1.3.10
BIN -431 Bytes (99%) gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-rc-5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
@@ -28,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -23,21 +23,18 @@ dependencies {
compile(project(":data"))
}

val publications: PublicationContainer = the<PublishingExtension>().publications
var externalLibsDir: File by rootProject.extra

tasks {
val jar by getting(Jar::class) {
val jar by existing(Jar::class) {
archiveName = "jclasslib-browser.jar"
manifest {
attributes(mapOf("Main-Class" to project.the<ApplicationPluginConvention>().mainClassName))
attributes("Main-Class" to application.mainClassName)
}
}

val copyDist by creating(Copy::class) {
val copyDist by registering(Copy::class) {
dependsOn("jar")
from(configurations.compile.files.filterNot { it.name.contains("install4j") })
from(jar.archivePath)
from(configurations.compile.map { it.files.filterNot { it.name.contains("install4j") } })
from(jar)
into(externalLibsDir)
}

@@ -13,44 +13,44 @@ dependencies {
compile(kotlin("stdlib"))
}

var externalLibsDir: File by rootProject.extra

tasks {
val jar by getting(Jar::class) {
val jar by existing(Jar::class) {
archiveName = "jclasslib-library.jar"
}

val copyDist by creating(Copy::class) {
dependsOn("jar")
val copyDist by registering(Copy::class) {
dependsOn(jar)
from(configurations.compile)
from(jar.archivePath)
from(jar)
into(externalLibsDir)
}

val dokka by getting(DokkaTask::class) {
val dokka by existing(DokkaTask::class) {
sourceDirs = setOf(file("src/main/kotlin"))
includes = listOf("packages.md")
}

val dokkaJavadoc by creating(DokkaTask::class) {
val dokkaJavadoc by registering(DokkaTask::class) {
outputFormat = "javadoc"
outputDirectory = "$buildDir/javadoc"
}

val doc by creating {
val doc by registering {
dependsOn(dokka, dokkaJavadoc)
}

val javadocJar by creating(Jar::class) {
val javadocJar by registering(Jar::class) {
dependsOn(dokkaJavadoc)
classifier = "javadoc"
from(dokkaJavadoc.outputDirectory)
from(dokkaJavadoc)
}

publishing {
publications {
named<MavenPublication>("Module") {
artifact(mapOf("source" to javadocJar, "classifier" to "javadoc"))
artifact(javadocJar.get()) {
classifier = "javadoc"
}
}
}
}
@@ -2,15 +2,13 @@ import org.jetbrains.intellij.tasks.PublishTask

plugins {
kotlin("jvm")
id("org.jetbrains.intellij") version "0.3.4"
id("org.jetbrains.intellij") version "0.3.12"
}

val kotlinVersion: String by project

dependencies {
compile(project(":browser"))
// explicit Kotlin dependency to prevent the intellij plugin from adding the Kotlin libraries in the lib directory
compile(kotlin("stdlib"))
}

intellij {
@@ -3,7 +3,7 @@
<idea-plugin url="https://github.com/ingokegel/jclasslib">
<id>jclasslib</id>
<name>jclasslib Bytecode viewer</name>
<description>Bytecode viewer for Java class files</description>
<description>jclasslib is a bytecode viewer for Java class files</description>
<version>5.0</version>
<vendor url="https://github.com/ingokegel/jclasslib">Ingo Kegel</vendor>
<idea-version since-build="162"/>
@@ -16,33 +16,31 @@ install4j {
}
}

val mediaDir: File by rootProject.extra

task("clean") {
doLast {
delete(mediaDir)
tasks {
register<Delete>("clean") {
delete(rootProject.file("media"))
}
}

task<Install4jTask>("media") {
dependsOn(":dist", ":clean")
group = "Build"
description = "Build all media files"

projectFile = file("resources/jclasslib.install4j")
release = version as String
disableSigning = !project.hasProperty("winCertPath") || !project.hasProperty("macCertPath")
winKeystorePassword = this@Installer_gradle.winKeystorePassword ?: ""
macKeystorePassword = this@Installer_gradle.macKeystorePassword ?: ""

variables = mapOf(
"winCertPath" to (winCertPath ?: ""),
"macCertPath" to (macCertPath ?: "")
)

doFirst {
if (install4jHomeDir == null) {
throw RuntimeException("Specify install4jHomeDir in gradle.properties and set it to an install4j installation directory")
register<Install4jTask>("media") {
dependsOn(":dist", ":clean")
group = "Build"
description = "Build all media files"

projectFile = file("resources/jclasslib.install4j")
release = version as String
disableSigning = !project.hasProperty("winCertPath") || !project.hasProperty("macCertPath")
winKeystorePassword = this@Installer_gradle.winKeystorePassword ?: ""
macKeystorePassword = this@Installer_gradle.macKeystorePassword ?: ""

variables = mapOf(
"winCertPath" to (winCertPath ?: ""),
"macCertPath" to (macCertPath ?: "")
)

doFirst {
if (install4jHomeDir == null) {
throw RuntimeException("Specify install4jHomeDir in gradle.properties and set it to an install4j installation directory")
}
}
}
}

0 comments on commit 06268d1

Please sign in to comment.