diff --git a/build.gradle.kts b/build.gradle.kts index e76d5567..4cb4c168 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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: @@ -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") } @@ -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") -> { @@ -139,6 +144,7 @@ kotlin { } js { + moduleName = project.name browser { testTask { useKarma { @@ -258,7 +264,7 @@ tasks.register("generate") { } tasks.register("jsPackagePrepare") { - dependsOn("jsMainClasses") + dependsOn("jsLegacyMainClasses") tasks["assemble"].dependsOn(this) group = "build" @@ -369,7 +375,7 @@ fun MavenPomFile.config(config: MavenPomFile.() -> Unit = {}) { } tasks.withType { - enabled = false + enabled = true } fun MavenPublication.jar(taskName: String, config: Action) = artifact(tasks.create(taskName, Jar::class, config)) diff --git a/gradle.properties b/gradle.properties index 24b55e47..658866bc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file +kotlin.code.style=official +kotlin.js.compiler=both \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index cc4fdc29..490fda85 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0ebb3108..6623300b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/gradlew.bat b/gradlew.bat index 9618d8d9..62bd9b9c 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -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" diff --git a/settings.gradle.kts b/settings.gradle.kts index 52648267..768c812d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1 +1,10 @@ -rootProject.name = "kotlinx-html" \ No newline at end of file +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") + } +} \ No newline at end of file diff --git a/src/jvmTest/resources/declarations.json b/src/jvmTest/resources/declarations.json index 160e9f72..e1987fcb 100644 --- a/src/jvmTest/resources/declarations.json +++ b/src/jvmTest/resources/declarations.json @@ -268,12 +268,9 @@ "members": [ {"visibility": "public", "declaration": "final fun (p1: kotlin.Any?): kotlin.Unit", "name": "invoke", "desc": "(Ljava/lang/Object;)Ljava/lang/Object;"}, {"visibility": "public", "declaration": "final fun (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 (p1: kotlin.Any?): kotlin.Unit", "name": "", "desc": "()V"}, {"name": "INSTANCE", "desc": "Lkotlinx/html/consumers/Trace_jvmKt$trace$1;"}, - {"visibility": "public", "declaration": "final class : kotlin.jvm.internal.FunctionReference, (message: kotlin.Any?) -> kotlin.Unit", "name": "", "desc": "()V"} + {"visibility": "public", "declaration": "final class : kotlin.jvm.internal.FunctionReferenceImpl, (kotlin.Any?) -> kotlin.Unit", "name": "", "desc": "()V"} ] }, { @@ -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.(): 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.(): 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"}, @@ -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.(): kotlin.String", "name": "getFor_", "desc": "(Lkotlinx/html/LABEL;)Ljava/lang/String;"}, {"visibility": "public", "declaration": "fun kotlinx.html.LABEL.(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.(): kotlin.String", "name": "getFor_", "desc": "(Lkotlinx/html/OUTPUT;)Ljava/lang/String;"}, {"visibility": "public", "declaration": "fun kotlinx.html.OUTPUT.(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.(): kotlin.String", "name": "getOnTouchcancel", "desc": "(Lkotlinx/html/CommonAttributeGroupFacade;)Ljava/lang/String;"}, {"visibility": "public", "declaration": "fun kotlinx.html.CommonAttributeGroupFacade.(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.(): kotlin.String", "name": "getOnTouchmove", "desc": "(Lkotlinx/html/CommonAttributeGroupFacade;)Ljava/lang/String;"}, {"visibility": "public", "declaration": "fun kotlinx.html.CommonAttributeGroupFacade.(newValue: kotlin.String): kotlin.Unit", "name": "setOnTouchmove", "desc": "(Lkotlinx/html/CommonAttributeGroupFacade;Ljava/lang/String;)V"} ] @@ -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", "name": "", "desc": "()V"}, {"visibility": "private", "declaration": "final val path: kotlin.collections.ArrayList /* = java.util.ArrayList */", "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;"},