Skip to content

Commit

Permalink
Prepare for Kotlin 1.4.0 (#156)
Browse files Browse the repository at this point in the history
* Prepare for M2

* Update declarations.json.

* Change kotlin version and kotlinx html version

* Update on latest pre release Kotlin

* Build against 1.4-M2

* Build against 1.4-M3

* Add dev into release

* Use Kotlin 1.4.0-rc

* Prepare for Kotlin 1.4.0

* Back settings.gradle.kts

* dev and eap repository for Kotlin 1.4.0

* Use 'all' Gradle Wrapper

Co-authored-by: dmitrievanthony <[email protected]>
  • Loading branch information
ilgonmic and dmitrievanthony authored Aug 13, 2020
1 parent 0151d53 commit f7aa4d7
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 20 deletions.
16 changes: 11 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import kotlinx.html.js.*
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsSetupTask
import Build_gradle.MavenPomFile
import kotlinx.html.js.packageJson
import org.apache.tools.ant.taskdefs.condition.Os
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsSetupTask

/**
* This build script supports following parameters:
Expand All @@ -13,7 +14,7 @@ import org.apache.tools.ant.taskdefs.condition.Os
* -PversionTag - works together with "branch-build" profile and overrides "-SNAPSHOT" suffix of the version.
*/
plugins {
kotlin("multiplatform") version "1.3.61"
kotlin("multiplatform") version "1.4.0"
id("maven-publish")
}

Expand Down Expand Up @@ -104,6 +105,10 @@ repositories {
jcenter()
mavenCentral()

// It is just for release against pre-release versions
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-eap") }
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-dev") }

when {
/** Allow all profiles but release to use development and SNAPSHOT dependencies. */
!hasProperty("release") -> {
Expand Down Expand Up @@ -139,6 +144,7 @@ kotlin {
}

js {
moduleName = project.name
browser {
testTask {
useKarma {
Expand Down Expand Up @@ -258,7 +264,7 @@ tasks.register<Task>("generate") {
}

tasks.register<Copy>("jsPackagePrepare") {
dependsOn("jsMainClasses")
dependsOn("jsLegacyMainClasses")
tasks["assemble"].dependsOn(this)

group = "build"
Expand Down Expand Up @@ -369,7 +375,7 @@ fun MavenPomFile.config(config: MavenPomFile.() -> Unit = {}) {
}

tasks.withType<GenerateModuleMetadata> {
enabled = false
enabled = true
}

fun MavenPublication.jar(taskName: String, config: Action<Jar>) = artifact(tasks.create(taskName, Jar::class, config))
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# The following property is required to mitigate issue https://github.com/gradle/gradle/issues/11412.
systemProp.org.gradle.internal.publish.checksums.insecure=true
kotlin.code.style=official
kotlin.code.style=official
kotlin.js.compiler=both
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 3 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@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="-Xmx64m" "-Xms64m"

Expand Down
11 changes: 10 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
rootProject.name = "kotlinx-html"
rootProject.name = "kotlinx-html"

pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap")
maven(url = "https://dl.bintray.com/kotlin/kotlin-dev")
}
}
19 changes: 7 additions & 12 deletions src/jvmTest/resources/declarations.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,9 @@
"members": [
{"visibility": "public", "declaration": "final fun <anonymous>(p1: kotlin.Any?): kotlin.Unit", "name": "invoke", "desc": "(Ljava/lang/Object;)Ljava/lang/Object;"},
{"visibility": "public", "declaration": "final fun <anonymous>(p1: kotlin.Any?): kotlin.Unit", "name": "invoke", "desc": "(Ljava/lang/Object;)V"},
{"name": "getOwner", "desc": "()Lkotlin/reflect/KDeclarationContainer;"},
{"name": "getName", "desc": "()Ljava/lang/String;"},
{"name": "getSignature", "desc": "()Ljava/lang/String;"},
{"visibility": "public", "declaration": "final fun <anonymous>(p1: kotlin.Any?): kotlin.Unit", "name": "<init>", "desc": "()V"},
{"name": "INSTANCE", "desc": "Lkotlinx/html/consumers/Trace_jvmKt$trace$1;"},
{"visibility": "public", "declaration": "final class <closure-Trace_jvmKt$trace$1> : kotlin.jvm.internal.FunctionReference, (message: kotlin.Any?) -> kotlin.Unit", "name": "<clinit>", "desc": "()V"}
{"visibility": "public", "declaration": "final class <closure-Trace_jvmKt$trace$1> : kotlin.jvm.internal.FunctionReferenceImpl, (kotlin.Any?) -> kotlin.Unit", "name": "<clinit>", "desc": "()V"}
]
},
{
Expand Down Expand Up @@ -745,9 +742,9 @@
{"visibility": "public", "declaration": "fun kotlinx.html.FIELDSET.legEnd(classes: kotlin.String? = ..., block: kotlinx.html.LEGEND.() -> kotlin.Unit = ...): kotlin.Unit", "name": "legEnd$default", "desc": "(Lkotlinx/html/FIELDSET;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V"},
{"visibility": "public", "declaration": "fun kotlinx.html.FIGURE.legEnd(classes: kotlin.String? = ..., block: kotlinx.html.LEGEND.() -> kotlin.Unit = ...): kotlin.Unit", "name": "legEnd", "desc": "(Lkotlinx/html/FIGURE;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V"},
{"visibility": "public", "declaration": "fun kotlinx.html.FIGURE.legEnd(classes: kotlin.String? = ..., block: kotlinx.html.LEGEND.() -> kotlin.Unit = ...): kotlin.Unit", "name": "legEnd$default", "desc": "(Lkotlinx/html/FIGURE;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V"},
{"visibility": "public", "declaration": "val kotlinx.html.Draggable.true_: kotlinx.html.Draggable", "name": "true_$annotations", "desc": "(Lkotlinx/html/Draggable;)V"},
{"visibility": "public", "declaration": "val kotlinx.html.Draggable.true_: kotlinx.html.Draggable", "name": "getTrue_$annotations", "desc": "(Lkotlinx/html/Draggable;)V"},
{"visibility": "public", "declaration": "inline fun kotlinx.html.Draggable.<get-true_>(): kotlinx.html.Draggable", "name": "getTrue_", "desc": "(Lkotlinx/html/Draggable;)Lkotlinx/html/Draggable;"},
{"visibility": "public", "declaration": "val kotlinx.html.Draggable.false_: kotlinx.html.Draggable", "name": "false_$annotations", "desc": "(Lkotlinx/html/Draggable;)V"},
{"visibility": "public", "declaration": "val kotlinx.html.Draggable.false_: kotlinx.html.Draggable", "name": "getFalse_$annotations", "desc": "(Lkotlinx/html/Draggable;)V"},
{"visibility": "public", "declaration": "inline fun kotlinx.html.Draggable.<get-false_>(): kotlinx.html.Draggable", "name": "getFalse_", "desc": "(Lkotlinx/html/Draggable;)Lkotlinx/html/Draggable;"},
{"visibility": "public", "declaration": "typealias OBJECT_ = kotlinx.html.OBJECT", "name": "OBJECT_$annotations", "desc": "()V"},
{"visibility": "public", "declaration": "typealias VAR_ = kotlinx.html.VAR", "name": "VAR_$annotations", "desc": "()V"},
Expand All @@ -759,16 +756,16 @@
{"visibility": "public", "declaration": "fun kotlinx.html.FlowOrPhrasingContent.var_(classes: kotlin.String? = ..., block: kotlinx.html.VAR.() -> kotlin.Unit): kotlin.Unit", "name": "var_$default", "desc": "(Lkotlinx/html/FlowOrPhrasingContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V"},
{"visibility": "public", "declaration": "fun kotlinx.html.FlowOrInteractiveOrPhrasingContent.object_(classes: kotlin.String? = ..., block: kotlinx.html.OBJECT.() -> kotlin.Unit = ...): kotlin.Unit", "name": "object_", "desc": "(Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V"},
{"visibility": "public", "declaration": "fun kotlinx.html.FlowOrInteractiveOrPhrasingContent.object_(classes: kotlin.String? = ..., block: kotlinx.html.OBJECT.() -> kotlin.Unit = ...): kotlin.Unit", "name": "object_$default", "desc": "(Lkotlinx/html/FlowOrInteractiveOrPhrasingContent;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V"},
{"visibility": "public", "declaration": "var kotlinx.html.LABEL.for_: kotlin.String", "name": "for_$annotations", "desc": "(Lkotlinx/html/LABEL;)V"},
{"visibility": "public", "declaration": "var kotlinx.html.LABEL.for_: kotlin.String", "name": "getFor_$annotations", "desc": "(Lkotlinx/html/LABEL;)V"},
{"visibility": "public", "declaration": "fun kotlinx.html.LABEL.<get-for_>(): kotlin.String", "name": "getFor_", "desc": "(Lkotlinx/html/LABEL;)Ljava/lang/String;"},
{"visibility": "public", "declaration": "fun kotlinx.html.LABEL.<set-for_>(value: kotlin.String): kotlin.Unit", "name": "setFor_", "desc": "(Lkotlinx/html/LABEL;Ljava/lang/String;)V"},
{"visibility": "public", "declaration": "var kotlinx.html.OUTPUT.for_: kotlin.String", "name": "for_$annotations", "desc": "(Lkotlinx/html/OUTPUT;)V"},
{"visibility": "public", "declaration": "var kotlinx.html.OUTPUT.for_: kotlin.String", "name": "getFor_$annotations", "desc": "(Lkotlinx/html/OUTPUT;)V"},
{"visibility": "public", "declaration": "fun kotlinx.html.OUTPUT.<get-for_>(): kotlin.String", "name": "getFor_", "desc": "(Lkotlinx/html/OUTPUT;)Ljava/lang/String;"},
{"visibility": "public", "declaration": "fun kotlinx.html.OUTPUT.<set-for_>(value: kotlin.String): kotlin.Unit", "name": "setFor_", "desc": "(Lkotlinx/html/OUTPUT;Ljava/lang/String;)V"},
{"visibility": "public", "declaration": "var kotlinx.html.CommonAttributeGroupFacade.onTouchcancel: kotlin.String", "name": "onTouchcancel$annotations", "desc": "(Lkotlinx/html/CommonAttributeGroupFacade;)V"},
{"visibility": "public", "declaration": "var kotlinx.html.CommonAttributeGroupFacade.onTouchcancel: kotlin.String", "name": "getOnTouchcancel$annotations", "desc": "(Lkotlinx/html/CommonAttributeGroupFacade;)V"},
{"visibility": "public", "declaration": "fun kotlinx.html.CommonAttributeGroupFacade.<get-onTouchcancel>(): kotlin.String", "name": "getOnTouchcancel", "desc": "(Lkotlinx/html/CommonAttributeGroupFacade;)Ljava/lang/String;"},
{"visibility": "public", "declaration": "fun kotlinx.html.CommonAttributeGroupFacade.<set-onTouchcancel>(newValue: kotlin.String): kotlin.Unit", "name": "setOnTouchcancel", "desc": "(Lkotlinx/html/CommonAttributeGroupFacade;Ljava/lang/String;)V"},
{"visibility": "public", "declaration": "var kotlinx.html.CommonAttributeGroupFacade.onTouchmove: kotlin.String", "name": "onTouchmove$annotations", "desc": "(Lkotlinx/html/CommonAttributeGroupFacade;)V"},
{"visibility": "public", "declaration": "var kotlinx.html.CommonAttributeGroupFacade.onTouchmove: kotlin.String", "name": "getOnTouchmove$annotations", "desc": "(Lkotlinx/html/CommonAttributeGroupFacade;)V"},
{"visibility": "public", "declaration": "fun kotlinx.html.CommonAttributeGroupFacade.<get-onTouchmove>(): kotlin.String", "name": "getOnTouchmove", "desc": "(Lkotlinx/html/CommonAttributeGroupFacade;)Ljava/lang/String;"},
{"visibility": "public", "declaration": "fun kotlinx.html.CommonAttributeGroupFacade.<set-onTouchmove>(newValue: kotlin.String): kotlin.Unit", "name": "setOnTouchmove", "desc": "(Lkotlinx/html/CommonAttributeGroupFacade;Ljava/lang/String;)V"}
]
Expand Down Expand Up @@ -8535,8 +8532,6 @@
"visibility": "public",
"class": "kotlinx/html/dom/HTMLDOMBuilder",
"members": [
{"name": "$$delegatedProperties", "desc": "[Lkotlin/reflect/KProperty;"},
{"visibility": "public", "declaration": "final class HTMLDOMBuilder : kotlinx.html.TagConsumer<org.w3c.dom.Element>", "name": "<clinit>", "desc": "()V"},
{"visibility": "private", "declaration": "final val path: kotlin.collections.ArrayList<org.w3c.dom.Element> /* = java.util.ArrayList<org.w3c.dom.Element> */", "name": "path", "desc": "Ljava/util/ArrayList;"},
{"visibility": "private", "declaration": "final var lastLeaved: org.w3c.dom.Element?", "name": "lastLeaved", "desc": "Lorg/w3c/dom/Element;"},
{"visibility": "private", "declaration": "final val documentBuilder: javax.xml.parsers.DocumentBuilder", "name": "documentBuilder$delegate", "desc": "Lkotlin/Lazy;"},
Expand Down

0 comments on commit f7aa4d7

Please sign in to comment.