Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow resources to be in a kotlin directory #268

Merged
merged 2 commits into from
Feb 14, 2020

Conversation

rockwotj
Copy link
Contributor

@rockwotj rockwotj commented Feb 1, 2020

We just put everything in a kotlin directory (which the test rules allow for) so it'd be nice if resources also didn't need this prefix.


This change is Reviewable

We just put everything in a `kotlin` directory (which the test rules allow for) so it'd be nice if resources also didn't need this prefix.
@cgruber
Copy link
Collaborator

cgruber commented Feb 6, 2020

Do you put them in "/kotlin" or do you mean "src/main/kotlin"? I'm a little hesitant to just make "kotlin" the split as it's not the most uncommon package name which could result in some bad (and breaking) source root inferences. I'd be more comfortable breaking on src/kotlin or src/*/kotlin.

@rockwotj
Copy link
Contributor Author

rockwotj commented Feb 6, 2020

I put them in /kotlin, the kt_jvm_test rules already support this.

_SPLIT_STRINGS = [
"src/test/java/",
"src/test/kotlin/",
"javatests/",
"kotlin/",
"java/",
"test/",
]

In general I'm not a fan of the unneeded maven structure of separating sources and tests.

I understand you can specify a prefix per binary, but we have many binaries and specifying the strip resource prefix is... annoying.

@cgruber
Copy link
Collaborator

cgruber commented Feb 10, 2020

Ahhh. I'm sorry, I get it now. I realize I had made the change I was thinking about already, and you're expanding it. I apparently can't read a simple diff. :/

This is fine.

@cgruber cgruber merged commit c3b8035 into bazelbuild:master Feb 14, 2020
cromwellian pushed a commit to cromwellian/rules_kotlin that referenced this pull request Mar 7, 2020
* Allow resources to be in a kotlin directory

We just put everything in a `kotlin` directory (which the test rules allow for) so it'd be nice if resources also didn't need this prefix.

* Update docs
cgruber added a commit to cgruber/rules_kotlin that referenced this pull request Apr 14, 2020
* 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)
jongerrish added a commit to jongerrish/rules_kotlin that referenced this pull request Apr 16, 2020
* Allow resources to be in a kotlin directory

We just put everything in a `kotlin` directory (which the test rules allow for) so it'd be nice if resources also didn't need this prefix.

* Update docs
@rockwotj rockwotj deleted the patch-1 branch October 10, 2022 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants