Skip to content

Commit

Permalink
Merge pull request #7 in ANDROID/buck from no/merge-upstream to master
Browse files Browse the repository at this point in the history
* commit '5860f1ccb114d2a1786748603a444996debd09f6': (680 commits)
  Fix crash building Android rules
  Ignore classes within anonymous or local classes
  Fix annotations on inner class constructor params
  Enable `abi_verification_mode=fail`
  Fix stubs for deeply-nested static inner classes
  Fix references to deeply-nested enums
  Close cache at the end of cache command
  Add ndk.extra_ldflags
  Refactor creation of NDK ldflags
  Handle race conditions in Buck project constructor.
  ClassLoaderBootstrapper: Create ClassLoader earlier
  Stop logging "No Android platform target specified" to console
  JarBuilder: Eliminate checkNotNull
  Add more info for cannot delete directory failures
  AndroidLibraryDescription: Move ABI rule construction into the builder
  AndroidLibraryDescription: Move graph enhancement into the builder
  AndroidLibraryDescription: Push provided_deps_query into the builder
  DefaultJavaLibraryBuilder: Factor out getJavac
  DefaultJavaLibraryBuilder: Make initial BuildRuleParams accessible to subclasses
  Plumb TargetGraph and CellPathResolver into DefaultJavaLibraryBuilder
  ...
  • Loading branch information
Nelson Osacky committed May 23, 2017
2 parents a0c8cfb + 5860f1c commit c2777b1
Show file tree
Hide file tree
Showing 4,210 changed files with 127,608 additions and 139,539 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 4 additions & 2 deletions .buckconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
source_level = 8
target_level = 8
jar_spool_mode = direct_to_jar
abi_generation_mode = migrating_to_source
abi_generation_mode = source_with_deps
source_abi_verification_mode = fail
compile_against_abis = True
[alias]
buck = //programs:buck
Expand All @@ -22,7 +23,7 @@
; Disable the default directory cache.
mode =
[build]
metadata_storage = rocksdb
metadata_storage = sqlite
[download]
maven_repo = https://repo1.maven.org/maven2
[project]
Expand Down Expand Up @@ -57,6 +58,7 @@
; cache every time it encounters one.
allow_symlinks = forbid
watchman_cursor = clock_id
glob_handler = watchman
[test]
; Maximum timeout of 1 minute per test.
timeout = 90000
1 change: 1 addition & 0 deletions .buckrelease
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v2017.05.09.01
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<classpathentry kind="lib" path="third-party/java/hamcrest/hamcrest-junit-2.0.0.0.jar"/>
<classpathentry kind="lib" path="third-party/java/hamcrest/java-hamcrest-2.0.0.0.jar"/>
<classpathentry kind="lib" path="third-party/java/icu4j/icu4j-54.1.1.jar"/>
<classpathentry kind="lib" path="third-party/java/immutables/value-2.3.8.jar"/>
<classpathentry kind="lib" path="third-party/java/immutables/value-2.4.6.jar"/>
<classpathentry kind="lib" path="third-party/java/infer-annotations/infer-annotations-4.1.jar"/>
<classpathentry kind="lib" path="third-party/java/ini4j/ini4j-0.5.2.jar"/>
<classpathentry kind="lib" path="third-party/java/jackson/jackson-annotations-2.5.5.jar"/>
Expand Down
2 changes: 1 addition & 1 deletion .factorypath
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<factorypath>
<factorypathentry kind="PLUGIN" id="org.eclipse.jst.ws.annotations.core" enabled="false" runInBatchMode="false"/>
<factorypathentry kind="WKSPJAR" id="/buck/third-party/java/immutables/value-2.3.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="WKSPJAR" id="/buck/third-party/java/immutables/value-2.4.6.jar" enabled="true" runInBatchMode="false"/>
</factorypath>
19 changes: 0 additions & 19 deletions .idea/checkstyle-idea.xml

This file was deleted.

3 changes: 2 additions & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/libraries/eclipse_collections.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/libraries/immutables_annotations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/jcip_annotations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/jdom.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/libraries/kotlin.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/lz4.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/libraries/mapdb.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/libraries/okhttp_3_6_0.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/sqlite.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
language: java
jdk:
- oraclejdk8
env:
- CI_ACTION=build
- CI_ACTION=unit
- CI_ACTION=integration
- CI_ACTION=ant

# Enable container-based architecture.
sudo: false
Expand Down Expand Up @@ -43,10 +48,12 @@ before_install:
# Set up the Groovy environment
- export GROOVY_HOME=/usr/share/groovy/

# https://docs.travis-ci.com/user/caching#Things-not-to-cache
# https://docs.travis-ci.com/user/caching#Explicitly-disabling-caching
cache:
directories:
- $HOME/android-ndk-linux
- $HOME/android-sdk-linux
- $HOME/ndk_cache
- $HOME/sdk_cache

notifications:
slack: buckbuild:TnJN80RxFaSAuCGswsnWLdoj
Expand Down
89 changes: 11 additions & 78 deletions DEFS
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,26 @@ def java_immutables_library(name, **kwargs):
original_java_test = java_test
def java_test(
name,
deps=[],
vm_args=[],
labels=[],
run_test_separately=False,
has_immutable_types=False,
# deps, provided_deps and plugins are handled in kwargs so that immutables can be handled there
**kwargs
):
extra_labels = ['run_as_bundle']
if run_test_separately:
extra_labels.append('serialize')

if has_immutable_types:
kwargs = _add_immutables(**kwargs)

if 'deps' in kwargs:
deps = kwargs['deps']
del kwargs['deps']
else:
deps = []

original_java_test(
name,
deps=deps + [
Expand Down Expand Up @@ -85,72 +95,14 @@ def java_test(
**kwargs
)

def standard_java_library(
name,
srcs = None,
has_immutable_types = False,
tests = None,
resources = None,

deps = None,
exported_deps = None,

provided_deps = None,
visibility = None,
):
'''By default, generates a java_library() with the following args:

java_library(
name = <DIRECTORY_NAME>,
srcs = glob(['*.java']),
deps = deps,
exported_deps = exported_deps,
visibility = [
'PUBLIC',
],
)

Some of these fields can be overridden.
'''
if srcs is None:
srcs = glob(['*.java'])
if tests is None:
tests = []
if resources is None:
resources = []
if provided_deps is None:
provided_deps = []
if visibility is None:
visibility = [ 'PUBLIC' ]

if has_immutable_types:
build_rule = java_immutables_library
else:
build_rule = java_library

build_rule(
name = name,
srcs = srcs,
resources = resources,
tests = tests,
deps = deps or [],
exported_deps = exported_deps or [],
provided_deps = provided_deps,
visibility = visibility,
)

def standard_java_test(
name,
run_test_separately = False,
vm_args = None,
fork_mode = 'none',
labels = None,
has_immutable_types = False,
**kwargs
):
if has_immutable_types:
kwargs = _add_immutables(**kwargs)

if vm_args is None:
vm_args = ['-Xmx256M']

Expand All @@ -167,22 +119,3 @@ def standard_java_test(
labels = labels or [],
**kwargs
)

def standard_java_testutil(name, deps = None, exported_deps = None, provided_deps = None):
srcs = glob(['*.java'])
testutil_srcs = []
for src in srcs:
if not src.endswith('Test.java'):
testutil_srcs.append(src)

if len(testutil_srcs) > 0:
java_library(
name = name,
srcs = testutil_srcs,
deps = deps or [],
exported_deps = exported_deps or [],
provided_deps = provided_deps or [],
visibility = [
'//test/...',
]
)
2 changes: 1 addition & 1 deletion bin/buckd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

# Resolve symlinks if necessary, otherwise madness will follow.
# On a GNU system, we could use "-f" to follow all symlinks. BSD based
Expand Down
6 changes: 4 additions & 2 deletions bin/dbuck
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

BUCK_BIN="$(cd "`dirname "$0"`" && pwd)"

# Runs buck in debug mode with the given args
if ! buck kill; then
if ! "$BUCK_BIN/buck" kill; then
echo "$0: failed to kill buck" >&2
exit 1
fi
Expand All @@ -13,4 +15,4 @@ if test -n "$pids"; then
done
fi

BUCK_DEBUG_MODE=1 NO_BUCKD=1 buck "$@"
BUCK_DEBUG_MODE=1 NO_BUCKD=1 "$BUCK_BIN/buck" "$@"
10 changes: 9 additions & 1 deletion buck.iml
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,13 @@
<orderEntry type="library" name="jna-platform-4.2.0" level="project" />
<orderEntry type="library" name="rocksdbjni-5.1.2" level="project" />
<orderEntry type="library" name="diffutils-1.3.0" level="project" />
<orderEntry type="library" name="jdom" level="project" />
<orderEntry type="library" name="eclipse-collections" level="project" />
<orderEntry type="library" name="jcip-annotations" level="project" />
<orderEntry type="library" name="kotlin" level="project" />
<orderEntry type="library" name="lz4" level="project" />
<orderEntry type="library" name="mapdb" level="project" />
<orderEntry type="library" name="okhttp-3.6.0" level="project" />
<orderEntry type="library" name="sqlite" level="project" />
</component>
</module>
</module>

0 comments on commit c2777b1

Please sign in to comment.