File tree Expand file tree Collapse file tree 7 files changed +13
-17
lines changed
kotlin/io/bazel/kotlin/builder/toolchain
starlark/core/repositories
test/kotlin/io/bazel/kotlin/builder/tasks Expand file tree Collapse file tree 7 files changed +13
-17
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- load ("@com_github_jetbrains_kotlin//:artifacts .bzl" , "KOTLINC_ARTIFACTS " )
15
+ load ("@rules_java//java:defs .bzl" , "java_import " )
16
16
load ("//kotlin:js.bzl" , "kt_js_import" )
17
17
load ("//kotlin:jvm.bzl" , "kt_jvm_import" )
18
18
load ("//kotlin/internal:defs.bzl" , _KT_COMPILER_REPO = "KT_COMPILER_REPO" )
19
+ load ("@com_github_jetbrains_kotlin//:artifacts.bzl" , "KOTLINC_ARTIFACTS" )
19
20
20
21
def _import_artifacts (artifacts , rule_kind ):
21
22
_import_labels (artifacts .plugin , rule_kind )
22
23
_import_labels (artifacts .runtime , rule_kind )
23
24
_import_labels (artifacts .compile , rule_kind , neverlink = 1 )
24
25
25
26
def _import_labels (labels , rule_kind , ** rule_args ):
26
- for (label , file ) in labels .items ():
27
- if not file .endswith (".jar" ):
28
- native .filegroup (
29
- name = label ,
30
- srcs = [
31
- "@%s//:%s" % (_KT_COMPILER_REPO , label ),
32
- ],
33
- )
34
- return
35
-
27
+ for label in labels :
36
28
if "-sources" in label :
37
29
continue
38
30
args = dict (rule_args .items ())
Original file line number Diff line number Diff line change @@ -152,6 +152,10 @@ kt_js_import = rule(
152
152
cfg = "exec" ,
153
153
),
154
154
},
155
+ outputs = dict (
156
+ js = "%{module_name}.js" ,
157
+ js_map = "%{module_name}.js.map" ,
158
+ ),
155
159
implementation = _kt_js_import_impl ,
156
160
provides = [_KtJsInfo ],
157
161
)
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import org.jetbrains.kotlin.preloading.ClassPreloadingUtils
24
24
import org.jetbrains.kotlin.preloading.Preloader
25
25
import java.io.File
26
26
import java.io.PrintStream
27
+ import java.lang.ClassLoader
27
28
import java.lang.reflect.Method
28
29
import java.nio.file.FileSystems
29
30
import java.nio.file.Path
@@ -258,6 +259,6 @@ class KotlinToolchain private constructor(
258
259
toolchain : KotlinToolchain ,
259
260
) : KotlinCliToolInvoker(
260
261
toolchain.toolchainWithReflect(),
261
- " org.jetbrains.kotlin.cli.js.K2JsIrCompiler " ,
262
+ " org.jetbrains.kotlin.cli.js.K2JSCompiler " ,
262
263
)
263
264
}
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
+ package(default_visibility = ["//visibility:public"])
15
+
14
16
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
15
17
load(":artifacts.bzl", "KOTLINC_ARTIFACT_LIST")
16
18
17
- package(default_visibility = ["//visibility:public"])
18
-
19
19
bzl_library(
20
20
name = "capabilities",
21
21
srcs = glob(["*.bzl"]),
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ KOTLINC_ARTIFACTS = struct(
5
5
plugin = {},
6
6
runtime = {
7
7
"kotlin-stdlib-js" : "lib/kotlin-stdlib-js.jar" ,
8
- "kotlin-stdlib-js-klib" : "lib/kotlin-stdlib-js.klib" ,
9
8
"kotlin-stdlib-js-sources" : "lib/kotlin-stdlib-js-sources.jar" ,
10
9
"kotlin-test-js" : "lib/kotlin-test-js.jar" ,
11
10
"kotlin-test-js-sources" : "lib/kotlin-test-js-sources.jar" ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ kt_rules_test(
103
103
name = "KotlinBuilderJsTest" ,
104
104
srcs = ["js/KotlinBuilderJsTest.java" ],
105
105
data = [
106
- "//kotlin/compiler:kotlin-stdlib-js-klib " ,
106
+ "//kotlin/compiler:kotlin-stdlib-js.js " ,
107
107
],
108
108
)
109
109
Original file line number Diff line number Diff line change 12
12
public class KotlinBuilderJsTest {
13
13
private static final KotlinJsTestBuilder builder = new KotlinJsTestBuilder ();
14
14
15
- private Dep stdLib = Dep .fromLabel ("//kotlin/compiler: kotlin-stdlib-js-klib " );
15
+ private Dep stdLib = Dep .fromLabel ("@com_github_jetbrains_kotlin//:lib/ kotlin-stdlib-js.jar " );
16
16
17
17
@ Test
18
18
public void testSimpleJsCompile () {
You can’t perform that action at this time.
0 commit comments