Skip to content

Commit

Permalink
Setup build system.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccxvii committed Oct 3, 2017
1 parent 1c5ed06 commit 8cb96d0
Show file tree
Hide file tree
Showing 7 changed files with 772 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.gradle
build
local.properties
MAVEN
661 changes: 661 additions & 0 deletions COPYING

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This is a very simple Makefile that calls 'gradlew' to do the heavy lifting.
#
# The tool 'adb' must be on the path, so that we can find the Android SDK.

ANDROID_HOME := $(shell which adb | sed 's,/platform-tools/adb,,')

debug: assembleDebug
release: assembleRelease
install: installDebug

assembleDebug:
ANDROID_HOME=$(ANDROID_HOME) ./gradlew assembleDebug
assembleRelease:
ANDROID_HOME=$(ANDROID_HOME) ./gradlew assembleRelease
installDebug:
ANDROID_HOME=$(ANDROID_HOME) ./gradlew installDebug
lint:
ANDROID_HOME=$(ANDROID_HOME) ./gradlew lint
archive:
ANDROID_HOME=$(ANDROID_HOME) ./gradlew uploadArchives
sync: archive
rsync -av MAVEN/com/ ghostscript.com:/var/www/maven.ghostscript.com/com/

run: installDebug ;
adb shell am start -n com.artifex.mupdf.demo/.LibraryActivity

clean:
rm -rf .gradle build
rm -rf jni/.externalNativeBuild jni/.gradle jni/build
rm -rf lib/.gradle lib/build
rm -rf app/.gradle app/build
21 changes: 21 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apply plugin: 'com.android.application'

group = 'com.artifex.mupdf'
version = '1.11.0'

dependencies {
compile 'com.android.support:appcompat-v7:25.+'
if (file('../lib/build.gradle').isFile())
compile project(':lib')
else
compile 'com.artifex.mupdf:viewer:+'
}

android {
compileSdkVersion 25
buildToolsVersion '25.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
}
}
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}

allprojects {
repositories {
jcenter()
maven { url 'http://maven.ghostscript.com/' }
}
}
40 changes: 40 additions & 0 deletions lib/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apply plugin: 'com.android.library'
apply plugin: 'maven'

group = 'com.artifex.mupdf'
version = '1.11.0'

dependencies {
if (file('../jni/build.gradle').isFile())
compile project(':jni')
else
compile 'com.artifex.mupdf:fitz:1.11.0'
}

android {
compileSdkVersion 25
buildToolsVersion '25.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
}
}

uploadArchives {
repositories {
mavenDeployer {
repository(url: 'file://MAVEN')
pom {
artifactId = 'viewer'
project {
licenses {
license {
name 'GNU Affero General Public License'
url 'https://www.gnu.org/licenses/agpl-3.0.html'
}
}
}
}
}
}
}
3 changes: 3 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include ':jni'
include ':lib'
include ':app'

0 comments on commit 8cb96d0

Please sign in to comment.