This repository has been archived by the owner on May 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 817
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- reorganize around a standard gradle directory structure - create gradle build files - separate Android specific utilities from the physics core to allow use on other java platforms (processing) - create a continuous integration build script for travis CI - move to proper semver versioning. The API for rebound is not fully finalized we should be at version 0.3 - API is unchanged TODO: - maven hosting for build artifacts to allow easy integration
- Loading branch information
1 parent
bc55a77
commit 6e5a8dc
Showing
67 changed files
with
636 additions
and
563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[alias] | ||
core = //rebound-core:src | ||
test = //rebound-core:test | ||
android = //rebound-android:src | ||
app = //rebound-android-example:bin | ||
rebound = //:rebound | ||
|
||
[project] | ||
ignore = .git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ buck-* | |
out | ||
docs | ||
build | ||
.DS_Store | ||
.DS_Store | ||
_site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
language: java | ||
jdk: oraclejdk7 | ||
env: | ||
matrix: | ||
- ANDROID_SDKS=android-19,sysimg-19 ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a | ||
before_install: | ||
# Install base Android SDK | ||
- sudo apt-get update -qq | ||
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi | ||
- wget http://dl.google.com/android/android-sdk_r22.3-linux.tgz | ||
- tar xzf android-sdk_r22.3-linux.tgz | ||
- export ANDROID_HOME=$PWD/android-sdk-linux | ||
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools | ||
|
||
# Gradle | ||
- wget http://services.gradle.org/distributions/gradle-1.8-bin.zip | ||
- unzip gradle-1.8-bin.zip | ||
- export GRADLE_HOME=$PWD/gradle-1.8 | ||
- export PATH=$GRADLE_HOME/bin:$PATH | ||
|
||
# install android build tools | ||
- wget https://dl-ssl.google.com/android/repository/build-tools_r19-linux.zip | ||
- unzip build-tools_r19-linux.zip -d $ANDROID_HOME | ||
- mkdir -p $ANDROID_HOME/build-tools/ | ||
- mv $ANDROID_HOME/android-4.4 $ANDROID_HOME/build-tools/19 | ||
- ls -la $ANDROID_HOME/build-tools/19 | ||
- echo $ANDROID_HOME | ||
|
||
# Install required components. | ||
# For a full list, run `android list sdk -a --extended` | ||
# Note that sysimg-18 downloads the ARM, x86 and MIPS images (we should optimize this). | ||
# Other relevant API's | ||
- echo yes | android update sdk --filter platform-tools --no-ui --force > /dev/null | ||
- echo yes | android update sdk --filter android-18 --no-ui --force > /dev/null | ||
- echo yes | android update sdk --filter android-19 --no-ui --force > /dev/null | ||
- echo yes | android update sdk --filter sysimg-19 --no-ui --force > /dev/null | ||
- echo yes | android update sdk --filter extra-android-support --no-ui --force > /dev/null | ||
- echo yes | android update sdk --filter extra-android-m2repository --no-ui --force > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,8 @@ | ||
prebuilt_jar( | ||
name = 'mockito', | ||
binary_jar = 'libs/mockito-all-1.9.5.jar', | ||
) | ||
|
||
prebuilt_jar( | ||
name = 'robolectric', | ||
binary_jar = 'libs/robolectric-2.2-20130606.235928-4-jar-with-dependencies.jar', | ||
) | ||
|
||
prebuilt_jar( | ||
name = 'junit', | ||
binary_jar = 'libs/junit-4.11.jar', | ||
) | ||
|
||
android_resource( | ||
name = 'res', | ||
res = 'res', | ||
package = 'com.facebook.rebound', | ||
visibility = ['//:rebound'], | ||
) | ||
|
||
java_test( | ||
name = 'rebound_test', | ||
srcs = glob(['test/**/*Test.java']), | ||
visibility = ['//:rebound'], | ||
deps = [ | ||
'//:robolectric', | ||
'//:mockito', | ||
'//:junit', | ||
'//:rebound' | ||
], | ||
source_under_test = ['//:rebound'], | ||
) | ||
|
||
android_library( | ||
# A special build that includes rebound-android but not the resources so that a jar file can be | ||
# created for distribution to users who do not use the gradle aar and don't need the utils like | ||
# SpringConfiguratorView. | ||
java_binary( | ||
name = 'rebound', | ||
srcs = glob(['src/**/*.java']), | ||
deps = [ | ||
'//:res' | ||
], | ||
deps = ['//rebound-android:src-no-res'], | ||
visibility = ['PUBLIC'], | ||
) | ||
|
||
project_config( | ||
src_target = '//:rebound', | ||
test_target = '//:rebound_test', | ||
src_roots = ['src'], | ||
test_roots = ['test'], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:0.7.1+' | ||
} | ||
} | ||
|
||
apply plugin: 'android-library' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
android { | ||
compileSdkVersion 19 | ||
buildToolsVersion "19.0.0" | ||
|
||
defaultConfig { | ||
minSdkVersion 14 | ||
targetSdkVersion 17 | ||
} | ||
|
||
sourceSets { | ||
main { | ||
manifest.srcFile 'AndroidManifest.xml' | ||
java.srcDirs = ['src'] | ||
resources.srcDirs = ['src'] | ||
res.srcDirs = ['res'] | ||
} | ||
} | ||
} | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. |
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:0.7.1+' | ||
} | ||
} | ||
|
||
apply plugin: 'android' | ||
|
||
dependencies { | ||
compile project(':rebound-android') | ||
} | ||
|
||
android { | ||
compileSdkVersion 19 | ||
buildToolsVersion "19.0.0" | ||
|
||
defaultConfig { | ||
minSdkVersion 14 | ||
targetSdkVersion 19 | ||
} | ||
|
||
signingConfigs { | ||
debug { | ||
storeFile file("debug.keystore") | ||
storePassword "android" | ||
keyAlias "androiddebugkey" | ||
keyPassword "android" | ||
} | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
signingConfig signingConfigs.debug | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.8 KB
rebound-android-example/src/main/res/drawable-xxhdpi/rebound_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<fragment | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:name="com.facebook.rebound.example.ZoomFragment" | ||
android:id="@+id/zoom_fragment" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
/> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
example/res/values/strings.xml → ...d-example/src/main/res/values/strings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="app_name">Rebound Example</string> | ||
<string name="cd_scaling_image">landscape photo</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
android_resource( | ||
name = 'res', | ||
res = 'src/main/res', | ||
package = 'com.facebook.rebound', | ||
visibility = ['//rebound-android:src'], | ||
) | ||
|
||
android_library( | ||
name = 'src', | ||
srcs = glob(['src/main/java/**/*.java']), | ||
deps = [ | ||
'//rebound-core:src', | ||
'//rebound-android:res', | ||
], | ||
visibility = ['PUBLIC'], | ||
) | ||
|
||
android_library( | ||
name = 'src-no-res', | ||
srcs = glob( | ||
['src/main/java/**/*.java'], | ||
excludes = ['src/main/java/com/facebook/rebound/ui/*'], | ||
), | ||
deps = [ | ||
'//rebound-core:src', | ||
], | ||
visibility = ['PUBLIC'], | ||
) | ||
|
||
project_config( | ||
src_target = '//rebound-android:src', | ||
src_roots = ['src/main/java'], | ||
) |
Oops, something went wrong.