Skip to content
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
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,23 @@ READY/
.settings
*.so
*~
.idea/
third-party/drag-sort-listview/drag-sort-listview.iml
third-party/android-filechooser/android-filechooser.iml
third-party/SuperToasts/SuperToasts.iml
fbreader/zip-amse/zip-amse.iml
fbreader/util/util.iml
fbreader/text-formats/text-formats.iml
fbreader/resources/resources.iml
fbreader/common/common.iml
fbreader/app/app.iml
fbreader/api/api.iml
FBReader-Android-Forked.iml
*.keystore
third-party/AmbilWarna/AmbilWarna.iml
fbreader/text-formats/
fbreader/app/arm64v8a/
fbreader/app/armv7a/
fbreader/app/fat/
fbreader/app/x86/
fbreader/app/x8664/
19 changes: 19 additions & 0 deletions FBReader-Android-2.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="FBReader-Android-2" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
31 changes: 31 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
buildscript {
repositories {
jcenter()
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}

allprojects {
repositories {
jcenter()
google()
}
//added to remove compilation warnings:
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
project.ext {
globalBuildToolsVersion="27.0.3" //"28.0.0-rc1" // '28.0.0 rc1'
globalMinSdkVersion=16
globalMaxSdkVersion=27
globalTargetSdkVersion=18 //27 //'P' //27 //MAX 18 for SDCARD READ/WRITE Permissions without adding more code
globalCompileSdkVersion=27 //'android-P' //27
}
}
27 changes: 6 additions & 21 deletions fbreader/api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
buildscript {
repositories {
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}

apply plugin: 'com.android.library'

dependencies {
compile project(':fbreader/util')
api project(':util')
}

android {
compileSdkVersion 10
buildToolsVersion '20'
compileSdkVersion project.ext.globalCompileSdkVersion
buildToolsVersion project.ext.globalBuildToolsVersion

lintOptions {
abortOnError false
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

sourceSets {
main.java.srcDirs = ['src/main/java']
main.aidl.srcDirs = ['src/main/java']
Expand All @@ -35,9 +20,9 @@ android {
}

defaultConfig {
minSdkVersion 5
maxSdkVersion 10
targetSdkVersion 9
minSdkVersion project.ext.globalMinSdkVersion
maxSdkVersion project.ext.globalMaxSdkVersion
targetSdkVersion project.ext.globalTargetSdkVersion
versionCode 1
versionName "1.0"
}
Expand Down
163 changes: 93 additions & 70 deletions fbreader/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,45 +1,54 @@
buildscript {
repositories {
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
google()
}
}

apply plugin: 'com.android.application'

dependencies {
compile project(':fbreader/api')
compile project(':fbreader/util')
compile project(':fbreader/common')
compile project(':fbreader/resources')
compile project(':fbreader/text-formats')
compile project(':fbreader/zip-amse')
compile project(':third-party/drag-sort-listview')
compile project(':third-party/android-filechooser')
compile project(':third-party/SuperToasts')
compile project(':third-party/AmbilWarna')
compile files('libs/nanohttpd-2.0.5.jar')
compile files('libs/httpmime-4.2.5.jar')
compile files('libs/pdfparse.jar')
implementation project(':api')
api project(':util')
api project(':common')
api project(':resources')
api project(':text-formats')
api project(':drag-sort-listview')
api project(':android-filechooser')
api project(':SuperToasts')
api project(':AmbilWarna')
api project(':zip-amse')

implementation 'com.android.support:support-v4:27.1.1'
implementation ('com.googlecode.json-simple:json-simple:1.1.1') {
exclude group: 'junit', module: 'junit'
}

implementation files('libs/nanohttpd-2.0.5.jar')
implementation files('libs/httpmime-4.2.5.jar')
implementation files('libs/pdfparse.jar')
}

android {
compileSdkVersion 19
buildToolsVersion '20'
compileSdkVersion project.ext.globalCompileSdkVersion
buildToolsVersion project.ext.globalBuildToolsVersion
useLibrary 'org.apache.http.legacy'

lintOptions {
abortOnError false
}

defaultConfig {
minSdkVersion 5
maxSdkVersion 10
targetSdkVersion 9
minSdkVersion project.ext.globalMinSdkVersion
maxSdkVersion project.ext.globalMaxSdkVersion
targetSdkVersion project.ext.globalTargetSdkVersion
versionCode 0
versionName new File("$projectDir/VERSION").text.trim()
multiDexEnabled true

buildConfigField "String", "FBNETWORK_KEY", "${FBREADER_ORG_FBNETWORK_KEY}"
buildConfigField "String", "FBNETWORK_SECRET", "${FBREADER_ORG_FBNETWORK_SECRET}"
}

sourceSets {
Expand All @@ -52,30 +61,24 @@ android {
}

signingConfigs {
debug {
}
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}

buildTypes {
debug {
minifyEnabled false
debuggable true
versionNameSuffix '-DEBUG'
}

release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
signingConfig signingConfigs.release

buildConfigField "String", "FBNETWORK_KEY", "${FBREADER_ORG_FBNETWORK_KEY}"
buildConfigField "String", "FBNETWORK_SECRET", "${FBREADER_ORG_FBNETWORK_SECRET}"
// signingConfig signingConfigs.release
}
}

applicationVariants.all { variant ->
def generateHelpTask = project.tasks.create "generateHelp${variant.name.capitalize()}", Exec
generateHelpTask.commandLine('src/main/help/generate.py', 'src/main/help/proto', 'src/main/help/html', variant.outputs[0].processResources.assetsDir.path + '/data/intro')
variant.mergeResources.dependsOn(generateHelpTask)
}
}

android {
Expand All @@ -85,43 +88,62 @@ android {
fat {
dimension 'abi'
ndk {
abiFilters 'x86', 'armeabi-v7a', 'armeabi', 'mips'
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
// , 'armeabi', 'mips' //obsolete
versionCode 0
}
}
arm {
dimension 'abi'
ndk {
abiFilter 'armeabi'
versionCode 1
}
}
armv7a {
dimension 'abi'
ndk {
abiFilter 'armeabi-v7a'
versionCode 2
}
}
x86 {
dimension 'abi'
ndk {
abiFilter 'x86'
versionCode 3
}
}
mips {
dimension 'abi'
ndk {
abiFilter 'mips'
versionCode 4
}
}
// // arm { //obsolete
// // dimension 'abi'
// // ndk {
// // abiFilter 'armeabi'
// // versionCode 1
// // }
// // }
// armv7a {
// dimension 'abi'
// ndk {
// abiFilter 'armeabi-v7a'
// versionCode 1
// }
// }
// arm64v8a {
// dimension 'abi'
// ndk {
// abiFilter 'arm64-v8a'
// versionCode 2
// }
// }
// x86 {
// dimension 'abi'
// ndk {
// abiFilter 'x86'
// versionCode 3
// }
// }
// x8664 {
// dimension 'abi'
// ndk {
// abiFilter 'x86_64'
// versionCode 4
// }
// }
// // mips { //obsolete
// // dimension 'abi'
// // ndk {
// // abiFilter 'mips'
// // versionCode 4
// // }
// // }
}

task ndkBuild(type: Exec) {
def ndkDir = plugins.getPlugin('com.android.application').sdkHandler.getNdkFolder()
commandLine "$ndkDir/ndk-build", '-C', file('src/main/jni').absolutePath
def ndkDir = project.android.ndkDirectory.absolutePath
if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
commandLine "$ndkDir\\ndk-build.cmd", '-C', file('src/main/jni').absolutePath
} else {
commandLine "$ndkDir/ndk-build", '-C', file('src/main/jni').absolutePath
}
}

tasks.withType(JavaCompile) {
Expand Down Expand Up @@ -154,6 +176,7 @@ android.applicationVariants.all { variant ->
} else {
throw new IllegalArgumentException('Unsupported version format: ' + version)
}

variant.mergedFlavor.versionCode = baseCode + 10 + abiVersion
variant.outputs.all { output ->
output.setVersionCodeOverride(baseCode + 10 + abiVersion)
}
}
11 changes: 6 additions & 5 deletions fbreader/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
>
<uses-sdk
android:minSdkVersion="5"
android:maxSdkVersion="10"
android:targetSdkVersion="9"
android:targetSdkVersion="27"
/>
<!--android:maxSdkVersion="10"
/-->
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.INTERNET" android:required="false"/>
<uses-permission android:name="android.permission.WAKE_LOCK" android:required="false"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" android:required="false"/>
<application
android:name="org.geometerplus.android.fbreader.FBReaderApplication"
android:icon="@drawable/fbreader"
Expand Down
Loading