Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into merge_from_upstream
Browse files Browse the repository at this point in the history
* upstream/master:
  Fix non-reproducible archives (bazelbuild#304)
  Adds a kt_plugin rule (bazelbuild#308)
  Ensure that KotlionBuilder workers use a clean directory for each compilation. (bazelbuild#298)
  Apply autoformatting to all files. (bazelbuild#302)
  Optional outputs (bazelbuild#291)
  Change plugins to use depsets, as opposed to lists. (bazelbuild#292)
  Add Corbin to the codeowners. (bazelbuild#293)
  Update Protobuf to 3.11.3 (bazelbuild#286)
  Remove tree artifacts (bazelbuild#287)
  Cleanup src tree (bazelbuild#288)
  Update README.md (bazelbuild#285)
  Filter non-kotlin code out of generated sources (bazelbuild#263)
  Update readme so the dev instructions highlight using a local clone (bazelbuild#283)
  Remove third_party checked in jars, and properly pull maven dependencies. (bazelbuild#279)
  Only propagate srcjar if it isn't the default empty jar added in ae70089 to fix bazelbuild/intellij#1616 (bazelbuild#276)
  Allow resources to be in a kotlin directory (bazelbuild#268)
  • Loading branch information
cgruber committed Apr 14, 2020
2 parents c10a5b7 + 5efac99 commit c35d806
Show file tree
Hide file tree
Showing 167 changed files with 6,055 additions and 5,467 deletions.
24 changes: 12 additions & 12 deletions .bazelci/presubmit.yml
Expand Up @@ -16,21 +16,21 @@ tasks:
- "//:rules_kotlin_release"
rbe_ubuntu1604:
test_targets:
- "--"
- "//src/test/kotlin/io/bazel/kotlin/builder:builder_tests"
# KotlinJvmDaggerExampleTest and KotlinJvmKaptAssertionTest are not remote
# execution compatible, do not run them for now.
- "//src/test/kotlin/io/bazel/kotlin:KotlinJvmFriendsVisibilityTest"
- "//src/test/kotlin/io/bazel/kotlin:KotlinJvmBasicAssertionTest"
- "//examples/dagger/..."
- "--"
- "//src/test/kotlin/io/bazel/kotlin/builder:builder_tests"
# KotlinJvmDaggerExampleTest and KotlinJvmKaptAssertionTest are not remote
# execution compatible, do not run them for now.
- "//src/test/kotlin/io/bazel/kotlin:KotlinJvmFriendsVisibilityTest"
- "//src/test/kotlin/io/bazel/kotlin:KotlinJvmBasicAssertionTest"
- "//examples/dagger/..."
test_flags:
# Override the default worker strategy for remote builds (worker strategy
# cannot be used with remote builds)
- "--strategy=KotlinCompile=remote"
# Override the default worker strategy for remote builds (worker strategy
# cannot be used with remote builds)
- "--strategy=KotlinCompile=remote"
macos:
test_targets:
- "//:all_tests"
- "//examples/dagger/..."
- "//:all_tests"
- "//examples/dagger/..."
example-android:
name: "Example - Android"
platform: ubuntu1804
Expand Down
8 changes: 5 additions & 3 deletions .bazelproject
Expand Up @@ -26,8 +26,10 @@ targets:
//examples/dagger/...
# These targets are built for the ide only. Primary purpose is to ensure the builder can build the targets, but it's
# also a good way of testing the intellij plugin.
//src/main/kotlin/io/bazel/kotlin/builder:builder_kt_for_ide
//src/main/kotlin:compiler_lib_for_ide
//src/main/kotlin/io/bazel/kotlin/builder/tasks:tasks_for_ide
//src/main/kotlin/io/bazel/kotlin/builder/utils:utils_for_ide
//src/main/kotlin/io/bazel/kotlin/builder/toolchain:toolchain_for_ide
//src/main/kotlin/io/bazel/kotlin/compiler:compiler_for_ide

test_sources:
src/test/*
Expand All @@ -36,4 +38,4 @@ additional_languages:
kotlin

import_run_configurations:
src/test/Bazel_all_local_tests.xml
src/test/Bazel_all_local_tests.xml
2 changes: 1 addition & 1 deletion .bazelrc
@@ -1,4 +1,4 @@
build --strategy=KotlinCompile=worker
build --test_output=errors
build --test_output=all
build --verbose_failures

1 change: 1 addition & 0 deletions .bazelversion
@@ -0,0 +1 @@
2.0.0
4 changes: 4 additions & 0 deletions .editorconfig
@@ -0,0 +1,4 @@
[*.{kt, kts}]
indent_size = 2
insert_final_newline = true
max_line_length = 100
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
@@ -1 +1 @@
* @ahumesky @cgruber @djwhang @jin @timpeut
* @ahumesky @cgruber @djwhang @jin @timpeut @restingbull
120 changes: 9 additions & 111 deletions WORKSPACE
Expand Up @@ -13,126 +13,24 @@
# limitations under the License.
workspace(name = "io_bazel_rules_kotlin")

RULES_NODEJS_VERSION = "0.36.1"
RULES_NODEJS_SHA = "3356c6b767403392bab018ce91625f6d15ff8f11c6d772dc84bc9cada01c669a"
load("//kotlin:dependencies.bzl", "kt_download_local_dev_dependencies")

BAZEL_TOOLCHAINS_VERSION = "be10bee3010494721f08a0fccd7f57411a1e773e"
BAZEL_TOOLCHAINS_SHA = "5962fe677a43226c409316fcb321d668fc4b7fa97cb1f9ef45e7dc2676097b26"
kt_download_local_dev_dependencies()

SKYLIB_VERSION = "0.8.0"
SKYLIB_SHA = "2ea8a5ed2b448baf4a6855d3ce049c4c452a6470b1efd1504fdb7c1c134d220a"

PROTOBUF_GIT_COMMIT = "09745575a923640154bcf307fba8aedff47f240a" # v3.8.0, as of 2019-05-28
PROTOBUF_SHA = "76ee4ba47dec6146872b6cd051ae5bd12897ef0b1523d5aeb56d81a5a4ca885a"

BAZEL_DEPS_VERSION = "0.1.0"
BAZEL_DEPS_SHA = "05498224710808be9687f5b9a906d11dd29ad592020246d4cd1a26eeaed0735e"


local_repository(
name = "node_example",
path = "examples/node",
)

load("//kotlin/internal/repositories:repositories.bzl", "github_archive")

github_archive(
name = "com_google_protobuf",
commit = PROTOBUF_GIT_COMMIT,
repo = "google/protobuf",
sha256 = PROTOBUF_SHA,
)

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_jar")

http_archive(
name = "bazel_skylib",
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/%s.tar.gz" % SKYLIB_VERSION],
strip_prefix = "bazel-skylib-%s" % SKYLIB_VERSION,
sha256 = SKYLIB_SHA,
)

http_jar(
name = "bazel_deps",
sha256 = BAZEL_DEPS_SHA,
url = "https://github.com/hsyed/bazel-deps/releases/download/v%s/parseproject_deploy.jar" % BAZEL_DEPS_VERSION,
)

http_archive(
name = "bazel_toolchains",
sha256 = BAZEL_TOOLCHAINS_SHA,
strip_prefix = "bazel-toolchains-%s" % BAZEL_TOOLCHAINS_VERSION,
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/%s.tar.gz" % BAZEL_TOOLCHAINS_VERSION,
"https://github.com/bazelbuild/bazel-toolchains/archive/%s.tar.gz" % BAZEL_TOOLCHAINS_VERSION,
],
)

load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")

# Creates toolchain configuration for remote execution with BuildKite CI
# for rbe_ubuntu1604
rbe_autoconfig(
name = "buildkite_config",
)

load(
"//third_party/jvm:workspace.bzl", "maven_dependencies",
)

maven_dependencies()
load("//kotlin:kotlin.bzl", "kotlin_repositories", "kt_register_toolchains")

kotlin_repositories()

kt_register_toolchains()

# The following are to support building and running nodejs examples from src/test

http_archive(
name = "build_bazel_rules_nodejs",
sha256 = RULES_NODEJS_SHA,
url = "https://github.com/bazelbuild/rules_nodejs/releases/download/{0}/rules_nodejs-{0}.tar.gz".format(RULES_NODEJS_VERSION),
)

load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install")

yarn_install(
name = "node_ws",
package_json = "@node_example//:package.json",
yarn_lock = "@node_example//:yarn.lock",
)

RULES_JVM_EXTERNAL_TAG = "2.7"

RULES_JVM_EXTERNAL_SHA = "f04b1466a00a2845106801e0c5cec96841f49ea4e7d1df88dc8e4bf31523df74"
# Creates toolchain configuration for remote execution with BuildKite CI
# for rbe_ubuntu1604
load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")

http_archive(
name = "rules_jvm_external",
sha256 = RULES_JVM_EXTERNAL_SHA,
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
rbe_autoconfig(
name = "buildkite_config",
)

load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
artifacts = [
"org.jetbrains.kotlinx:atomicfu-js:0.13.1",
"org.jetbrains.kotlinx:kotlinx-coroutines-core-js:1.3.2",
],
repositories = [
"https://maven-central.storage.googleapis.com/repos/central/data/",
"https://repo1.maven.org/maven2",
],
)
android_sdk_repository(name = "androidsdk")

http_archive(
name = "rules_pkg",
url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz",
sha256 = "4ba8f4ab0ff85f2484287ab06c0d871dcb31cc54d439457d28fd4ae14b18450a",
)
android_ndk_repository(name = "androidndk")

0 comments on commit c35d806

Please sign in to comment.