From 9fea48513807460bd4d2abdd8612f43480ddd2c2 Mon Sep 17 00:00:00 2001 From: Martin Konicek Date: Mon, 18 Jan 2016 12:37:59 -0800 Subject: [PATCH] Build React Native with Buck Reviewed By: bestander Differential Revision: D2834002 fb-gh-sync-id: ebd5303a05fe9a01545365e4205d4cb8724a77a8 --- .buckconfig | 8 ++++++++ ReactAndroid/build.gradle | 3 ++- .../java/com/facebook/soloader/ApkSoSource.java | 0 .../com/facebook/soloader/DirectorySoSource.java | 0 .../java/com/facebook/soloader/Elf32_Dyn.java | 0 .../java/com/facebook/soloader/Elf32_Ehdr.java | 0 .../java/com/facebook/soloader/Elf32_Phdr.java | 0 .../java/com/facebook/soloader/Elf32_Shdr.java | 0 .../java/com/facebook/soloader/Elf64_Dyn.java | 0 .../java/com/facebook/soloader/Elf64_Ehdr.java | 0 .../java/com/facebook/soloader/Elf64_Phdr.java | 0 .../java/com/facebook/soloader/Elf64_Shdr.java | 0 .../java/com/facebook/soloader/ExoSoSource.java | 0 .../java/com/facebook/soloader/FileLocker.java | 0 .../java/com/facebook/soloader/MinElf.java | 0 .../java/com/facebook/soloader/NativeLibrary.java | 0 .../java/com/facebook/soloader/NoopSoSource.java | 0 .../java/com/facebook/soloader/SoLoader.java | 0 .../java/com/facebook/soloader/SoSource.java | 0 .../java/com/facebook/soloader/SysUtil.java | 0 .../java/com/facebook/soloader/genstructs.sh | 0 .../java/com/facebook/soloader/soloader.pro | 0 .../infer-annotations}/infer-annotations-1.5.jar | Bin 23 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .buckconfig rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/ApkSoSource.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/DirectorySoSource.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/Elf32_Dyn.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/Elf32_Ehdr.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/Elf32_Phdr.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/Elf32_Shdr.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/Elf64_Dyn.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/Elf64_Ehdr.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/Elf64_Phdr.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/Elf64_Shdr.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/ExoSoSource.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/FileLocker.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/MinElf.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/NativeLibrary.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/NoopSoSource.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/SoLoader.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/SoSource.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/SysUtil.java (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/genstructs.sh (100%) rename ReactAndroid/src/main/{ => libraries/soloader}/java/com/facebook/soloader/soloader.pro (100%) rename ReactAndroid/{libs => src/main/third-party/java/infer-annotations}/infer-annotations-1.5.jar (100%) diff --git a/.buckconfig b/.buckconfig new file mode 100644 index 000000000..cc1b65568 --- /dev/null +++ b/.buckconfig @@ -0,0 +1,8 @@ + +[android] + target = Google Inc.:Google APIs:23 + +[maven_repositories] + central = https://repo1.maven.org/maven2 + + diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index 9721ee4dd..d1dffee7b 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -228,6 +228,7 @@ android { jniLibs.srcDir "$buildDir/react-ndk/exported" res.srcDirs = ['src/main/res/devsupport', 'src/main/res/shell'] java { + srcDirs = ['src/main/java', 'src/main/libraries/soloader'] exclude 'com/facebook/react/processing' } } @@ -244,7 +245,7 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + compile fileTree(dir: 'src/main/third-party/java/infer-annotations/', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.android.support:recyclerview-v7:23.0.1' compile 'com.facebook.fresco:fresco:0.8.1' diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/ApkSoSource.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/ApkSoSource.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/ApkSoSource.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/ApkSoSource.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/DirectorySoSource.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/DirectorySoSource.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/DirectorySoSource.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/DirectorySoSource.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/Elf32_Dyn.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf32_Dyn.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/Elf32_Dyn.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf32_Dyn.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/Elf32_Ehdr.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf32_Ehdr.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/Elf32_Ehdr.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf32_Ehdr.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/Elf32_Phdr.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf32_Phdr.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/Elf32_Phdr.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf32_Phdr.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/Elf32_Shdr.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf32_Shdr.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/Elf32_Shdr.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf32_Shdr.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/Elf64_Dyn.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf64_Dyn.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/Elf64_Dyn.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf64_Dyn.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/Elf64_Ehdr.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf64_Ehdr.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/Elf64_Ehdr.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf64_Ehdr.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/Elf64_Phdr.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf64_Phdr.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/Elf64_Phdr.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf64_Phdr.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/Elf64_Shdr.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf64_Shdr.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/Elf64_Shdr.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/Elf64_Shdr.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/ExoSoSource.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/ExoSoSource.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/ExoSoSource.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/ExoSoSource.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/FileLocker.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/FileLocker.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/FileLocker.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/FileLocker.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/MinElf.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/MinElf.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/MinElf.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/MinElf.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/NativeLibrary.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/NativeLibrary.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/NativeLibrary.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/NativeLibrary.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/NoopSoSource.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/NoopSoSource.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/NoopSoSource.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/NoopSoSource.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/SoLoader.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/SoLoader.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/SoLoader.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/SoLoader.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/SoSource.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/SoSource.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/SoSource.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/SoSource.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/SysUtil.java b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/SysUtil.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/SysUtil.java rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/SysUtil.java diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/genstructs.sh b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/genstructs.sh similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/genstructs.sh rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/genstructs.sh diff --git a/ReactAndroid/src/main/java/com/facebook/soloader/soloader.pro b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/soloader.pro similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/soloader/soloader.pro rename to ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/soloader.pro diff --git a/ReactAndroid/libs/infer-annotations-1.5.jar b/ReactAndroid/src/main/third-party/java/infer-annotations/infer-annotations-1.5.jar similarity index 100% rename from ReactAndroid/libs/infer-annotations-1.5.jar rename to ReactAndroid/src/main/third-party/java/infer-annotations/infer-annotations-1.5.jar