diff --git a/build.gradle.kts b/build.gradle.kts index e76d5567..3cddd93e 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,12 +14,12 @@ 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-M3" id("maven-publish") } group = "org.jetbrains.kotlinx" -version = "0.7.2-SNAPSHOT" +version = "0.7.1-1.4-M3-SNAPSHOT" /** * If "release" profile is used the "-SNAPSHOT" suffix of the version is removed. @@ -103,6 +104,9 @@ publishing { repositories { jcenter() mavenCentral() + // It is just for release against Milestone 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. */ @@ -139,6 +143,7 @@ kotlin { } js { + moduleName = project.name browser { testTask { useKarma { @@ -258,7 +263,7 @@ tasks.register("generate") { } tasks.register("jsPackagePrepare") { - dependsOn("jsMainClasses") + dependsOn("jsLegacyMainClasses") tasks["assemble"].dependsOn(this) group = "build" @@ -369,7 +374,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..5c2d1cf0 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..a4b44297 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-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 2fe81a7d..83f2acfd 100755 --- a/gradlew +++ b/gradlew @@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then else eval `echo args$i`="\"$arg\"" fi - i=`expr $i + 1` + i=$((i+1)) done case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -175,9 +175,14 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=`save "$@"` +APP_ARGS=$(save "$@") # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + exec "$JAVACMD" "$@" diff --git a/settings.gradle.kts b/settings.gradle.kts index 52648267..a924b901 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1 +1,11 @@ -rootProject.name = "kotlinx-html" \ No newline at end of file +rootProject.name = "kotlinx-html" + +pluginManagement { + repositories { + mavenCentral() + mavenLocal() + 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;"},