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

Setup Kotlin home whenever the kotlin gradle plugin is on the classpath. #464

Merged
merged 1 commit into from
Jun 27, 2017

Conversation

runningcode
Copy link
Contributor

Previously we should only check if a module was a kotlin module which
didn't account for kotlin-android modules.

@@ -46,7 +45,7 @@ void okbuck() {
}

// Fetch Kotlin support deps if needed
boolean hasKotlinLib = okBuckExtension.buckProjects.parallelStream().anyMatch(project -> ProjectUtil.getType(project) == ProjectType.KOTLIN_LIB);
boolean hasKotlinLib = ProjectUtil.hasArtifactInClasspath(getProject(), KotlinUtil.KOTLIN_GROUP, KotlinUtil.KOTLIN_GRADLE_MODULE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this utility method into KotlinUtil instead? Its weird to put this on project util if its not reused anywhere else

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just call it KotlinUtil.hasKotlin(project) then as the constants can remain private

Previously we should only check if a module was a kotlin module which
didn't account for kotlin-android modules.
@kageiit kageiit merged commit 2ab6cf4 into uber:master Jun 27, 2017
@runningcode
Copy link
Contributor Author

Code looks much cleaner! :)

@runningcode runningcode deleted the no/kotlin-detect branch June 27, 2017 22:11
cwoodwar6 pushed a commit to cwoodwar6/okbuck that referenced this pull request Jun 27, 2017
* uber/master:
  Setup Kotlin home whenever the kotlin gradle plugin is on the classpath. (uber#464)
  Update several dependencies to latest (uber#462)
  Remove kotlin-dev repo as 1.1.3 is now released
  Add support for mixed kotlin and java in regular kotlin modules. (uber#461)
  Publish v0.22.1
  Fix rule type propagation
  Publish v0.22.0
  Update kotlin, gradle and buck versions (uber#460)
  Add kotlin android integration test and fixup source detection (uber#459)
  Kotlin Android Support (uber#458)
  Use more abstractions (uber#457)
  Prefer abstractions over implementations for upcoming kotlin refactors (uber#456)
  Add option to exclude some resources from aapt (uber#455)
  Bump to gradle 4.0 stable. (uber#454)
  Publish v0.21.0
  Migrate to kotlin in memory compiler support in buck (uber#450)
  Change how dependencies are resolved in preparation for Andrioid Gradle Plugin 3.x (uber#451)
  Switch the ordering of build config fields. (uber#449)
  Publish v0.20.10
  Revert "Add empty resource rule if using resource union. (uber#438)"
cwoodwar6 pushed a commit to cwoodwar6/okbuck that referenced this pull request Jul 27, 2017
…pstream

* upstream/master: (25 commits)
  Skip OkBuck if we just want to run buck help. (uber#470)
  Set WORKING_DIR to the location of the buck wrapper. (uber#471)
  Publish v0.22.4
  Add logic to buckw to update buck and build it if needed (uber#469)
  Use relative path for merged proguard file
  Publish v0.22.3
  Better error message
  Allow transform config to accept project dependencies (uber#466)
  Remove unused parameters and clean up some code. (uber#439)
  Publish v0.22.2
  Do not generate default project ignores
  Setup Kotlin home whenever the kotlin gradle plugin is on the classpath. (uber#464)
  Update several dependencies to latest (uber#462)
  Remove kotlin-dev repo as 1.1.3 is now released
  Add support for mixed kotlin and java in regular kotlin modules. (uber#461)
  Publish v0.22.1
  Fix rule type propagation
  Publish v0.22.0
  Update kotlin, gradle and buck versions (uber#460)
  Add kotlin android integration test and fixup source detection (uber#459)
  ...
cwoodwar6 pushed a commit to cwoodwar6/okbuck that referenced this pull request Jul 27, 2017
…tream to master

* commit 'f6cf823f3d9035887cd20bb23f58711e26fe76da': (27 commits)
  Further cleanup of unused project types from our initial implementation
  Remove unused kotlin + java test clases
  Skip OkBuck if we just want to run buck help. (uber#470)
  Set WORKING_DIR to the location of the buck wrapper. (uber#471)
  Publish v0.22.4
  Add logic to buckw to update buck and build it if needed (uber#469)
  Use relative path for merged proguard file
  Publish v0.22.3
  Better error message
  Allow transform config to accept project dependencies (uber#466)
  Remove unused parameters and clean up some code. (uber#439)
  Publish v0.22.2
  Do not generate default project ignores
  Setup Kotlin home whenever the kotlin gradle plugin is on the classpath. (uber#464)
  Update several dependencies to latest (uber#462)
  Remove kotlin-dev repo as 1.1.3 is now released
  Add support for mixed kotlin and java in regular kotlin modules. (uber#461)
  Publish v0.22.1
  Fix rule type propagation
  Publish v0.22.0
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants