Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ task copyPublicHeaders(type: Copy) {
// TODO: With the Intl API implementation, we have java class files inside the hermes library on Android,
// Which has non-platform dependencies such as fbjni, facebook annotation library etc.
// It is no longer appropriate or correct to publish hermes as a flat archive, instead we should publish as a maven library with proper POM file describing the dependencies.
task githubRelease(dependsOn: ['hermes:assembleIntl', 'cppruntime:build', 'copyApiHeaders', 'copyJsiHeaders', 'copyPublicHeaders'], type: Tar) {
task githubRelease(dependsOn: ['hermes-engine:assembleIntl', 'copyApiHeaders', 'copyJsiHeaders', 'copyPublicHeaders'], type: Tar) {
archiveBaseName = "hermes-runtime-android"
archiveVersion = "v" + release_version
archiveExtension = "tar.gz"
Expand All @@ -94,7 +94,7 @@ task githubRelease(dependsOn: ['hermes:assembleIntl', 'cppruntime:build', 'copyA
from "$outputDir"
}

task githubReleaseNoIntl(dependsOn: ['hermes:assembleNointl', 'cppruntime:build', 'copyApiHeaders', 'copyJsiHeaders', 'copyPublicHeaders'], type: Tar) {
task githubReleaseNoIntl(dependsOn: ['hermes-engine:assembleNointl', 'copyApiHeaders', 'copyJsiHeaders', 'copyPublicHeaders'], type: Tar) {
archiveBaseName = "hermes-runtime-android-nointl"
archiveVersion = "v" + release_version
archiveExtension = "tar.gz"
Expand Down
24 changes: 16 additions & 8 deletions android/hermes/build.gradle → android/hermes-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ android {
// Allow using prefab so that we can import libfbjni.so.
buildFeatures {
prefab true
prefabPublishing true
}

dependencies {
Expand All @@ -111,6 +112,13 @@ android {
exclude "**/libfbjni.so"
}

prefab {
libhermes {
headers "$buildDir/../outputs/include"
libraryName "libhermes"
}
}

afterEvaluate {
// Gradle 4/5.0 outputs android-debug.aar and android-release.aar
// Gradle 5.1 outputs android.aar for both
Expand All @@ -119,26 +127,26 @@ android {
def aarDir = "$buildDir/outputs/aar"
tasks.named("assembleIntlDebug").configure {
doLast {
file("$aarDir/hermes-intl-debug.aar").renameTo("${rootProject.ext.outputDir}/hermes-debug.aar")
file("$aarDir/hermes-intl.aar").renameTo("${rootProject.ext.outputDir}/hermes-debug.aar")
file("$aarDir/hermes-engine-intl-debug.aar").renameTo("${rootProject.ext.outputDir}/hermes-debug.aar")
file("$aarDir/hermes-engine-intl.aar").renameTo("${rootProject.ext.outputDir}/hermes-debug.aar")
}
}
tasks.named("assembleIntlRelease").configure {
doLast {
file("$aarDir/hermes-intl-release.aar").renameTo("${rootProject.ext.outputDir}/hermes-release.aar")
file("$aarDir/hermes-intl.aar").renameTo("${rootProject.ext.outputDir}/hermes-release.aar")
file("$aarDir/hermes-engine-intl-release.aar").renameTo("${rootProject.ext.outputDir}/hermes-release.aar")
file("$aarDir/hermes-engine-intl.aar").renameTo("${rootProject.ext.outputDir}/hermes-release.aar")
}
}
tasks.named("assembleNointlDebug").configure {
doLast {
file("$aarDir/hermes-nointl-debug.aar").renameTo("${rootProject.ext.outputDir}/hermes-debug.aar")
file("$aarDir/hermes-nointl.aar").renameTo("${rootProject.ext.outputDir}/hermes-debug.aar")
file("$aarDir/hermes-engine-nointl-debug.aar").renameTo("${rootProject.ext.outputDir}/hermes-debug.aar")
file("$aarDir/hermes-engine-nointl.aar").renameTo("${rootProject.ext.outputDir}/hermes-debug.aar")
}
}
tasks.named("assembleNointlRelease").configure {
doLast {
file("$aarDir/hermes-nointl-release.aar").renameTo("${rootProject.ext.outputDir}/hermes-release.aar")
file("$aarDir/hermes-nointl.aar").renameTo("${rootProject.ext.outputDir}/hermes-release.aar")
file("$aarDir/hermes-engine-nointl-release.aar").renameTo("${rootProject.ext.outputDir}/hermes-release.aar")
file("$aarDir/hermes-engine-nointl.aar").renameTo("${rootProject.ext.outputDir}/hermes-release.aar")
}
}
tasks.named("mergeIntlDebugNativeLibs").configure {
Expand Down
4 changes: 2 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

rootProject.name = 'Hermes'

include ':hermes'
include ':cppruntime'
include ':hermes-engine'
// include ':cppruntime'
include ':intltest'
2 changes: 0 additions & 2 deletions npm/hermes-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
"README.md",
"android/hermes-debug.aar",
"android/hermes-release.aar",
"android/hermes-cppruntime-debug.aar",
"android/hermes-cppruntime-release.aar",
"android/include/**/*.h",
"linux64-bin/hermesc",
"osx-bin/hermesc"
Expand Down
Loading