...
 
Commits (2)
local.properties
.externalNativeBuild/
libs/
This diff is collapsed. Click to expand it.
# FBReader
FBReader library based on original FBReader repo + light source code modification most makes method public.
* https://github.com/geometer/FBReaderJ
\ No newline at end of file
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'com.github.dcendents.android-maven' // 'gradle install' task
android {
compileSdkVersion 11
buildToolsVersion "27.0.1"
defaultConfig {
minSdkVersion 3
targetSdkVersion 3
versionCode 1
versionName "0.0.5"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
// http://central.sonatype.org/pages/gradle.html
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(project.android.getBootClasspath().join(File.pathSeparator))
options.addStringOption('Xdoclint:none', '-quiet')
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
group = "com.github.axet.fbreader"
archivesBaseName = "ambilwarna"
version = android.defaultConfig.versionName
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Android FBReader Library'
packaging 'jar'
description 'Clone of https://code.google.com/p/android-color-picker/'
url 'https://gitlab.com/axet/android-fbreader-library'
scm {
connection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
developerConnection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
url 'https://gitlab.com/axet/android-fbreader-library'
}
licenses {
license {
name 'Apache License Version 2.0, January 2004'
url 'http://www.apache.org/licenses/LICENSE-2.0'
}
}
developers {
developer {
id 'axet'
name 'Alexey Kuznetsov'
email 'axet@me.com'
}
}
}
}
}
}
repositories {
jcenter()
mavenLocal()
google()
}
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'com.github.dcendents.android-maven' // 'gradle install' task
android {
compileSdkVersion 14
buildToolsVersion "27.0.1"
defaultConfig {
minSdkVersion 4
targetSdkVersion 16
versionCode 1
versionName "0.0.5"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
}
}
// http://central.sonatype.org/pages/gradle.html
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(project.android.getBootClasspath().join(File.pathSeparator))
options.addStringOption('Xdoclint:none', '-quiet')
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
group = "com.github.axet.fbreader"
archivesBaseName = "androidfilechooser"
version = android.defaultConfig.versionName
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Android FBReader Library'
packaging 'jar'
description 'FBReader base classes.'
url 'https://gitlab.com/axet/android-fbreader-library'
scm {
connection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
developerConnection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
url 'https://gitlab.com/axet/android-fbreader-library'
}
licenses {
license {
name 'GNU GENERAL PUBLIC LICENSE 3.0'
url 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}
developers {
developer {
id 'axet'
name 'Alexey Kuznetsov'
email 'axet@me.com'
}
}
}
}
}
}
dependencies {
compile 'com.github.axet.fbreader:util:0.0.1' // compile project(':util')
}
buildscript {
repositories {
jcenter()
mavenLocal()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
}
}
repositories {
jcenter()
mavenLocal()
google()
}
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'com.github.dcendents.android-maven' // 'gradle install' task
android {
compileSdkVersion 21
buildToolsVersion "27.0.1"
defaultConfig {
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "0.0.22"
ndk {
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64", "mips", "mips64"
}
}
lintOptions {
disable 'WrongViewCast'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
}
externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
}
}
// http://central.sonatype.org/pages/gradle.html
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(project.android.getBootClasspath().join(File.pathSeparator))
options.addStringOption('Xdoclint:none', '-quiet')
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
group = "com.github.axet.fbreader"
archivesBaseName = "library"
version = android.defaultConfig.versionName
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Android FBReader Library'
packaging 'jar'
description 'FBReader base classes.'
url 'https://gitlab.com/axet/android-fbreader-library'
scm {
connection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
developerConnection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
url 'https://gitlab.com/axet/android-fbreader-library'
}
licenses {
license {
name 'custom open-source'
url 'https://gitlab.com/axet/android-fbreader-library/blob/master/androidFileChooser/LICENSE'
}
}
developers {
developer {
id 'axet'
name 'Alexey Kuznetsov'
email 'axet@me.com'
}
}
}
}
}
}
dependencies {
implementation 'com.android.support:support-v4:21.0.3'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.github.axet.fbreader:androidfilechooser:0.0.5' // compile project(':androidFileChooser')
compile 'com.github.axet.fbreader:dragsortlistview:0.0.5' // compile project(':dragSortListview')
compile 'com.github.axet.fbreader:ambilwarna:0.0.5' // compile project(':ambilWarna')
compile 'com.github.axet.fbreader:supertoasts:0.0.5' // compile project(':superToasts')
compile 'com.github.axet:pdfparse-lib:1.0'
compile('com.googlecode.json-simple:json-simple:1.1.1') {
exclude group: 'junit'
}
compile 'org.apache.httpcomponents:httpmime:4.2.5'
compile 'com.nanohttpd:nanohttpd:2.1.0'
}
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'com.github.dcendents.android-maven' // 'gradle install' task
android {
compileSdkVersion 14
buildToolsVersion "27.0.1"
defaultConfig {
minSdkVersion 5
targetSdkVersion 7
versionCode 1
versionName "0.0.5"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
// http://central.sonatype.org/pages/gradle.html
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(project.android.getBootClasspath().join(File.pathSeparator))
options.addStringOption('Xdoclint:none', '-quiet')
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
group = "com.github.axet.fbreader"
archivesBaseName = "dragsortlistview"
version = android.defaultConfig.versionName
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Android FBReader Library'
packaging 'jar'
description 'Clone of https://github.com/JohnPersano/SuperToasts'
url 'https://gitlab.com/axet/android-fbreader-library'
scm {
connection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
developerConnection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
url 'https://gitlab.com/axet/android-fbreader-library'
}
licenses {
license {
name 'Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0'
}
}
developers {
developer {
id 'axet'
name 'Alexey Kuznetsov'
email 'axet@me.com'
}
}
}
}
}
}
dependencies {
implementation 'com.android.support:support-v4:19.1.0'
}
include ':util'
include ':dragSortListview'
include ':ambilWarna'
include ':superToasts'
include ':androidFileChooser'
......@@ -280,4 +280,39 @@ final class ZLTextElementAreaVector {
}
return null;
}
public boolean swapRtl(boolean rtlMode, int first, int end) {
boolean detected = false;
for (int i = first; i < end; i++) {
ZLTextElementArea e = myAreas.get(i);
if (e.Element instanceof ZLTextWord) {
boolean b = ZLTextView.isRtl(rtlMode, e.Element.toString());
if (rtlMode != b) {
int rangeStart = i;
int rangeEnd = i;
while (rangeEnd < end && b == ZLTextView.isRtl(rtlMode, myAreas.get(rangeEnd).Element.toString()))
rangeEnd++;
int rangeLast = rangeEnd - 1;
e = myAreas.get(rtlMode ? rangeLast : rangeStart);
int XStart = e.XStart;
ZLTextElementArea prev = null;
for (int k = rtlMode ? rangeStart : rangeLast; rtlMode ? k <= rangeLast : k >= rangeStart; k += rtlMode ? 1 : -1) {
e = myAreas.get(k);
if (prev != null) {
detected = true;
XStart += prev.XStart - e.XEnd;
}
prev = e;
int XWidth = e.XEnd - e.XStart;
int XEnd = XStart + XWidth;
e = new ZLTextElementArea(e.ParagraphIndex, e.ElementIndex, e.CharIndex, e.Length, e.isLastInElement(), e.AddHyphenationSign, e.ChangeStyle, e.Style, e.Element, XStart, XEnd, e.YStart, e.YEnd, e.ColumnIndex);
myAreas.set(k, e);
XStart = XEnd;
}
i = rangeLast;
}
}
}
return detected;
}
}
......@@ -60,12 +60,49 @@ public abstract class ZLTextView extends ZLTextViewBase {
private ZLTextRegion.Soul myOutlinedRegionSoul;
private boolean myShowOutline = true;
public boolean rtlDetected = false;
public boolean rtlMode = false;
private final ZLTextSelection mySelection = new ZLTextSelection(this);
private final Set<ZLTextHighlighting> myHighlightings =
Collections.synchronizedSet(new TreeSet<ZLTextHighlighting>());
private CursorManager myCursorManager;
public static boolean isRtl(boolean rtlMode, String s) {
if(isRtl(s))
return true;
if(rtlMode && isLtr(s))
return false;
if(!rtlMode)
return false;
return true;
}
public static boolean isRtl(String s) {
for(char c : s.toCharArray()) {
switch(Character.getDirectionality(c)) {
case Character.DIRECTIONALITY_RIGHT_TO_LEFT:
case Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC:
case Character.DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING:
case Character.DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE:
return true;
}
}
return false;
}
public static boolean isLtr(String s) {
for(char c : s.toCharArray()) {
switch(Character.getDirectionality(c)) {
case Character.DIRECTIONALITY_LEFT_TO_RIGHT:
case Character.DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING:
case Character.DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE:
return true;
}
}
return false;
}
public ZLTextView(ZLApplication application) {
super(application);
}
......@@ -85,6 +122,10 @@ public abstract class ZLTextView extends ZLTextViewBase {
if (paragraphsNumber > 0) {
myCurrentPage.moveStartCursor(myCursorManager.get(0));
}
String ln = myModel.getLanguage();
if (ln != null)
rtlMode = ln.startsWith("ar") || ln.startsWith("ps") || ln.startsWith("fa") || ln.startsWith("iw") || ln.startsWith("he");
rtlDetected = false;
}
Application.getViewWidget().reset();
}
......@@ -360,7 +401,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
}
final ZLTextElementArea area = mySelection.getStartArea(page);
if (area != null) {
return new ZLTextSelection.Point(area.XStart, (area.YStart + area.YEnd) / 2);
return new ZLTextSelection.Point(rtlMode ? area.XEnd : area.XStart, (area.YStart + area.YEnd) / 2);
}
} else {
if (mySelection.hasPartAfterPage(page)) {
......@@ -368,7 +409,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
}
final ZLTextElementArea area = mySelection.getEndArea(page);
if (area != null) {
return new ZLTextSelection.Point(area.XEnd, (area.YStart + area.YEnd) / 2);
return new ZLTextSelection.Point(rtlMode ? area.XStart: area.XEnd, (area.YStart + area.YEnd) / 2);
}
}
return null;
......@@ -463,19 +504,21 @@ public abstract class ZLTextView extends ZLTextViewBase {
final ArrayList<ZLTextLineInfo> lineInfos = page.LineInfos;
final int[] labels = new int[lineInfos.size() + 1];
int x = getLeftMargin();
int x = (rtlMode ? ((page.twoColumnView() ? page.getTextWidth() * 2 + getSpaceBetweenColumns() : page.getTextWidth()) + getLeftMargin()) : getLeftMargin());
int y = getTopMargin();
int index = 0;
int columnIndex = 0;
ZLTextLineInfo previousInfo = null;
for (ZLTextLineInfo info : lineInfos) {
info.adjust(previousInfo);
int first = page.TextElementMap.size();
prepareTextLine(page, info, x, y, columnIndex);
rtlDetected |= page.TextElementMap.swapRtl(rtlMode, first, page.TextElementMap.size());
y += info.Height + info.Descent + info.VSpaceAfter;
labels[++index] = page.TextElementMap.size();
if (index == page.Column0Height) {
y = getTopMargin();
x += page.getTextWidth() + getSpaceBetweenColumns();
x += (page.getTextWidth() + getSpaceBetweenColumns()) * (rtlMode ? -1 : 1);
columnIndex = 1;
}
previousInfo = info;
......@@ -483,7 +526,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
final List<ZLTextHighlighting> hilites = findHilites(page);
x = getLeftMargin();
x = rtlMode ? ((page.twoColumnView() ? page.getTextWidth() * 2 + getSpaceBetweenColumns() : page.getTextWidth()) + getLeftMargin()) : getLeftMargin();
y = getTopMargin();
index = 0;
for (ZLTextLineInfo info : lineInfos) {
......@@ -492,7 +535,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
++index;
if (index == page.Column0Height) {
y = getTopMargin();
x += page.getTextWidth() + getSpaceBetweenColumns();
x += (page.getTextWidth() + getSpaceBetweenColumns()) * (rtlMode ? -1 : 1);
}
}
......@@ -1255,15 +1298,15 @@ public abstract class ZLTextView extends ZLTextViewBase {
final boolean endOfParagraph = info.isEndOfParagraph();
boolean wordOccurred = false;
boolean changeStyle = true;
x += info.LeftIndent;
x += info.LeftIndent * (rtlMode ? -1 : 1);
final int maxWidth = page.getTextWidth();
switch (getTextStyle().getAlignment()) {
case ZLTextAlignmentType.ALIGN_RIGHT:
x += maxWidth - getTextStyle().getRightIndent(metrics()) - info.Width;
x += (maxWidth - getTextStyle().getRightIndent(metrics()) - info.Width) * (rtlMode ? 0 : 1);
break;
case ZLTextAlignmentType.ALIGN_CENTER:
x += (maxWidth - getTextStyle().getRightIndent(metrics()) - info.Width) / 2;
x += ((maxWidth - getTextStyle().getRightIndent(metrics()) - info.Width) / 2) * (rtlMode ? -1 : 1);
break;
case ZLTextAlignmentType.ALIGN_JUSTIFY:
if (!endOfParagraph && (paragraphCursor.getElement(info.EndElementIndex) != ZLTextElement.AfterParagraph)) {
......@@ -1271,6 +1314,8 @@ public abstract class ZLTextView extends ZLTextViewBase {
}
break;
case ZLTextAlignmentType.ALIGN_LEFT:
x -= (maxWidth - getTextStyle().getLeftIndent(metrics()) - info.Width) * (rtlMode ? 1 : 0);
break;
case ZLTextAlignmentType.ALIGN_UNDEFINED:
break;
}
......@@ -1294,12 +1339,12 @@ public abstract class ZLTextView extends ZLTextViewBase {
true, // is last in element
false, // add hyphenation sign
false, // changed style
getTextStyle(), element, x, x + spaceLength, y, y, columnIndex
getTextStyle(), element, (rtlMode ? x-spaceLength : x), (rtlMode ? x : x + spaceLength), y, y, columnIndex
);
} else {
spaceElement = null;
}
x += spaceLength;
x += spaceLength * (rtlMode ? -1 : 1);
fullCorrection -= correction;
wordOccurred = false;
--spaceCounter;
......@@ -1318,7 +1363,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
true, // is last in element
false, // add hyphenation sign
changeStyle, getTextStyle(), element,
x, x + width - 1, y - height + 1, y + descent, columnIndex
(rtlMode ? x-width : x), (rtlMode ? x : x + width) - 1, y - height + 1, y + descent, columnIndex
));
changeStyle = false;
wordOccurred = true;
......@@ -1326,7 +1371,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
applyStyleChangeElement(element);
changeStyle = true;
}
x += width;
x += width * (rtlMode ? -1 : 1);
}
if (!endOfParagraph) {
final int len = info.EndCharIndex;
......@@ -1344,7 +1389,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
false, // is last in element
addHyphenationSign,
changeStyle, getTextStyle(), word,
x, x + width - 1, y - height + 1, y + descent, columnIndex
(rtlMode ? x-width : x), (rtlMode ? (x + 1) : (x + width - 1)), y - height + 1, y + descent, columnIndex
)
);
}
......
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'com.github.dcendents.android-maven' // 'gradle install' task
android {
compileSdkVersion 19
buildToolsVersion "27.0.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "0.0.5"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
// http://central.sonatype.org/pages/gradle.html
task javadoc(type: Javadoc) {
// source = android.sourceSets.main.java.srcDirs
// classpath += project.files(project.android.getBootClasspath().join(File.pathSeparator))
options.addStringOption('Xdoclint:none', '-quiet')
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
group = "com.github.axet.fbreader"
archivesBaseName = "supertoasts"
version = android.defaultConfig.versionName
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Android FBReader Library'
packaging 'jar'
description 'Clone of https://github.com/JohnPersano/SuperToasts'
url 'https://gitlab.com/axet/android-fbreader-library'
scm {
connection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
developerConnection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
url 'https://gitlab.com/axet/android-fbreader-library'
}
licenses {
license {
name 'Apache License Version 2.0, January 2004'
url 'http://www.apache.org/licenses/'
}
}
developers {
developer {
id 'axet'
name 'Alexey Kuznetsov'
email 'axet@me.com'
}
}
}
}
}
}
#!/bin/bash
set -e
git checkout -b update $(git rev-list --max-parents=0 HEAD)
./update.sh
#!/bin/bash
set -e
uuu() {
local FROM="$1"
local TO="$2"
local COUNT=${FROM%/}
local COUNT=`echo "${COUNT//\//$'\n'}" | wc -l`
if [[ "$FROM" == */ ]]; then
local COUNT=$((COUNT))
else
local COUNT=$((COUNT-1))
fi
echo "$FROM --> $TO"
mkdir -p "$TO"
git archive a/master -- "$FROM" | tar x --strip-components=$COUNT -C "$TO"
}
mmm() {
local FROM="$1"
local TO="$2"
mkdir -p "$TO"
rsync -av --remove-source-files "$FROM" "$TO"
}
git remote get-url a 2> /dev/null || git remote add a https://github.com/geometer/FBReaderJ
git fetch a
uuu proguard.cfg ./
uuu assets src/main/
uuu jni src/main/
uuu res src/main/
uuu fbreader/app/src/main/java src/main/
(
cd src/main/java/
for F in $( find . -name *.aidl ); do
TO="../aidl/$F"
echo "$F --> $TO"
mkdir -p $(dirname $TO)
mv "$F" "$TO"
done
)
mmm src/main/java/org/fbreader/util util/src/main/java/org/fbreader/
uuu third-party/AmbilWarna/AndroidManifest.xml ambilWarna/src/main/
uuu third-party/AmbilWarna/res ambilWarna/src/main/
uuu third-party/AmbilWarna/src/ ambilWarna/src/main/java
uuu third-party/SuperToasts/AndroidManifest.xml superToasts/src/main/
uuu third-party/SuperToasts/res superToasts/src/main/
uuu third-party/SuperToasts/src/ superToasts/src/main/java/
uuu third-party/android-filechooser/code/AndroidManifest.xml androidFileChooser/src/main/
uuu third-party/android-filechooser/LICENSE androidFileChooser/
uuu third-party/android-filechooser/NOTICE androidFileChooser/
uuu third-party/android-filechooser/code/proguard.cfg androidFileChooser
uuu third-party/android-filechooser/code/res androidFileChooser/src/main/
uuu third-party/android-filechooser/code/src/ androidFileChooser/src/main/java/
uuu third-party/drag-sort-listview/library/AndroidManifest.xml dragSortListview/src/main/
uuu third-party/drag-sort-listview/README.md dragSortListview/
uuu third-party/drag-sort-listview/library/res dragSortListview/src/main/
uuu third-party/drag-sort-listview/library/src/ dragSortListview/src/main/java/
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'com.github.dcendents.android-maven' // 'gradle install' task
android {
compileSdkVersion 14
buildToolsVersion "27.0.1"
defaultConfig {
minSdkVersion 4
targetSdkVersion 16
versionCode 1
versionName "0.0.5"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
// http://central.sonatype.org/pages/gradle.html
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(project.android.getBootClasspath().join(File.pathSeparator))
options.addStringOption('Xdoclint:none', '-quiet')
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
group = "com.github.axet.fbreader"
archivesBaseName = "util"
version = android.defaultConfig.versionName
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Android FBReader Library'
packaging 'jar'
description 'FBReader base classes.'
url 'https://gitlab.com/axet/android-fbreader-library'
scm {
connection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
developerConnection 'scm:git:https://gitlab.com/axet/android-fbreader-library'
url 'https://gitlab.com/axet/android-fbreader-library'
}
licenses {
license {
name 'GNU GENERAL PUBLIC LICENSE 2.0+'
url 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html'
}
}
developers {
developer {
id 'axet'
name 'Alexey Kuznetsov'
email 'axet@me.com'
}
}
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.geometerplus.zlibrary.ui.android.util">
</manifest>