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

Using ReadiumSDK and ReadiumLCP AARs instead of Git readium-sdk and readium-lcp-client submodules #152

Open
wants to merge 1 commit into
base: feature/latest-working-build-config
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[submodule "readium-sdk"]
path = readium-sdk
url = https://github.com/readium/readium-sdk.git
[submodule "readium-shared-js"]
path = readium-shared-js
url = https://github.com/readium/readium-shared-js.git
[submodule "readium-lcp-client"]
path = readium-lcp-client
url = https://github.com/readium/readium-lcp-client.git
18 changes: 16 additions & 2 deletions SDKLauncher-Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ dependencies {
compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
transitive = true;
}

api project(path: ':readium-sdk')
api project(path: ':readium-lcp')

// api fileTree(dir: 'libs', include: ['readium-lcp.aar'])
// api fileTree(dir: 'libs', include: ['readium-sdk.aar'])

// api files("libs/readium-sdk.aar")
// api files("libs/readium-lcp.aar")
// api files("readium-sdk.aar")
// api files("readium-lcp.aar")

// compile(name:'readium-sdk', ext:'aar')
// compile(name:'readium-lcp', ext:'aar')
}

task buildCssAssets(type: Copy) {
Expand Down Expand Up @@ -68,11 +82,11 @@ tasks.whenTaskAdded { task ->

if (ndk_experimental) {
task.dependsOn "buildAssets",
isDebug ? ":lcp:assembleDebug" : ":lcp:assembleRelease",
// isDebug ? ":lcp:assembleDebug" : ":lcp:assembleRelease",
"buildEpubReadingSystem"
} else {
task.dependsOn "buildAssets",
isDebug ? ":lcp:assembleDebug" : ":lcp:assembleRelease",
// isDebug ? ":lcp:assembleDebug" : ":lcp:assembleRelease",
"buildEpubReadingSystem"
}
}
Expand Down
16 changes: 8 additions & 8 deletions SDKLauncher-Android/app/build_epubReadingSystem.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ task buildEpubReadingSystem_Git() {
ext.branchAndroid = { return rootBranch }

// SDK
def sdkFolder = "$projectDir/../../readium-sdk/"
def sdkSha = getGitSha(sdkFolder)
def sdkStatus = getGitStatus(sdkFolder)
def sdkBranch = getGitBranch(sdkFolder, sdkSha)
def sdkTag = getGitTag(sdkFolder, sdkSha)
// def sdkFolder = "$projectDir/../../readium-sdk/"
def sdkSha = "N/A" // getGitSha(sdkFolder)
def sdkStatus = "N/A" // getGitStatus(sdkFolder)
def sdkBranch = "N/A" // getGitBranch(sdkFolder, sdkSha)
def sdkTag = "N/A" // getGitTag(sdkFolder, sdkSha)
def sdkClean = "false";

if (sdkStatus.length() == 0) {
sdkClean = "true";
}
// if (sdkStatus.length() == 0) {
// sdkClean = "true";
// }

ext.shaSDK = { return sdkSha }
ext.tagSDK = { return sdkTag }
Expand Down
82 changes: 47 additions & 35 deletions SDKLauncher-Android/app/build_stable.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ def ndk_skipARM = (rootProject.hasProperty("readium_ndk_skipARM") && rootProject
def key_password = (rootProject.hasProperty("readium_sign_key_password") ? rootProject.readium_sign_key_password : "nope")
def store_password = (rootProject.hasProperty("readium_sign_store_password") ? rootProject.readium_sign_store_password : "nope")

def lcpDir = project(':lcp').projectDir
def epub3Dir = project(':epub3').projectDir
def rsdkDir = project(':rsdk').projectDir
//def lcpDir = project(':lcp').projectDir
//def epub3Dir = project(':epub3').projectDir
//def rsdkDir = project(':rsdk').projectDir

println "[[${project.name}]] (APP) Skip ARM: ${ndk_skipARM}"
println "[[${project.name}]] (APP) Skip x86: ${ndk_skipX86}"

def currentBuildType
android {
packagingOptions {
pickFirst 'lib/armeabi-v7a/libgnustl_shared.so'
pickFirst 'lib/arm64-v8a/libgnustl_shared.so'
pickFirst 'lib/x86/libgnustl_shared.so'
pickFirst 'lib/x86_64/libgnustl_shared.so'
}

applicationVariants.all { variant ->
println "[[${project.name}]] (APP) libraryVariant buildType: ${variant.buildType.name}"

Expand Down Expand Up @@ -65,43 +72,48 @@ android {
java {
srcDirs = [
'./src/main/java',
"${epub3Dir}/../lib/src/main/java",
"${lcpDir}/src/clientlib/java",
"${lcpDir}/src/contentfilter/java"
// "../../readium-sdk/Platform/Android/lib/src/main/java",
// "../../readium-lcp-client/platform/android/lib/src/clientlib/java",
// "../../readium-lcp-client/platform/android/lib/src/contentfilter/java"
// "${epub3Dir}/../lib/src/main/java",
// "${lcpDir}/src/clientlib/java",
// "${lcpDir}/src/contentfilter/java"
]
} //java

jniLibs {
dependencies {
// project ":rsdk"
project ":lcp"
}
// srcDirs = [
// "${epub3Dir}/jniLibs/RELEASE",
// "${lcpDir}/jniLibs/RELEASE",
// "${epub3Dir}/jniLibs/DEBUG",
// "${lcpDir}/jniLibs/DEBUG"
// ]
} //jniLibs
// jniLibs {
// dependencies {
// // project ":rsdk"
// // project ":lcp"
// project ":readium-sdk"
// project ":readium-lcp"
// }
// // srcDirs = [
// // "${epub3Dir}/jniLibs/RELEASE",
// // "${lcpDir}/jniLibs/RELEASE",
// // "${epub3Dir}/jniLibs/DEBUG",
// // "${lcpDir}/jniLibs/DEBUG"
// // ]
// } //jniLibs
} //main
} //sourceSets

buildTypes {
debug {
sourceSets.main.jniLibs.srcDirs = [
// "${epub3Dir}/jniLibs/DEBUG",
"${lcpDir}/jniLibs/DEBUG"
]
// sourceSets.main.jniLibs.srcDirs = [
// // "${epub3Dir}/jniLibs/DEBUG",
// "${lcpDir}/jniLibs/DEBUG"
// ]

ext.enableCrashlytics = false

minifyEnabled = false
}
release {
sourceSets.main.jniLibs.srcDirs = [
// "${epub3Dir}/jniLibs/RELEASE",
"${lcpDir}/jniLibs/RELEASE"
]
// sourceSets.main.jniLibs.srcDirs = [
// // "${epub3Dir}/jniLibs/RELEASE",
// "${lcpDir}/jniLibs/RELEASE"
// ]

ext.enableCrashlytics = false

Expand All @@ -120,25 +132,25 @@ android {
if (!ndk_skipARM && !ndk_skipX86) {
'armeabi-v7a--arm64-v8a--x86--x86_64' {
dimension "version"
ndk.with {
abiFilters = ['armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64']
}
// ndk.with {
// abiFilters = ['armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64']
// }
}
} else {
if (!ndk_skipARM) {
'armeabi-v7a--arm64-v8a' {
dimension "version"
ndk.with {
abiFilters = ['armeabi-v7a', 'arm64-v8a']
}
// ndk.with {
// abiFilters = ['armeabi-v7a', 'arm64-v8a']
// }
}
}
if (!ndk_skipX86) {
'x86--x86_64' {
dimension "version"
ndk.with {
abiFilters = ['x86', 'x86_64']
}
// ndk.with {
// abiFilters = ['x86', 'x86_64']
// }
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions SDKLauncher-Android/readium-lcp/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
configurations.maybeCreate("default")
artifacts.add("default", file('readium-lcp.aar'))
2 changes: 2 additions & 0 deletions SDKLauncher-Android/readium-sdk/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
configurations.maybeCreate("default")
artifacts.add("default", file('readium-sdk.aar'))
14 changes: 8 additions & 6 deletions SDKLauncher-Android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
include ':epub3'
include ':rsdk'
// include ':epub3'
// include ':rsdk'

include ':lcp'
// include ':lcp'

include ':app'
include ':readium-sdk'
include ':readium-lcp'

project(':epub3').projectDir = new File(rootProject.projectDir, '../readium-sdk/Platform/Android/epub3')
project(':rsdk').projectDir = new File(rootProject.projectDir, '../readium-sdk/Platform/Android/lib')
// project(':epub3').projectDir = new File(rootProject.projectDir, '../readium-sdk/Platform/Android/epub3')
// project(':rsdk').projectDir = new File(rootProject.projectDir, '../readium-sdk/Platform/Android/lib')

project(':lcp').projectDir = new File(rootProject.projectDir, '../readium-lcp-client/platform/android/lib')
// project(':lcp').projectDir = new File(rootProject.projectDir, '../readium-lcp-client/platform/android/lib')
1 change: 0 additions & 1 deletion readium-lcp-client
Submodule readium-lcp-client deleted from 0277d7
1 change: 0 additions & 1 deletion readium-sdk
Submodule readium-sdk deleted from 41c079