Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

Commit

Permalink
couchbase package to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
cole stoltzfus committed Jun 21, 2021
1 parent 8a21c59 commit c0f5906
Show file tree
Hide file tree
Showing 123 changed files with 800 additions and 750 deletions.
9 changes: 4 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[submodule "libraries/couchbase-lite-java-core"]
path = libraries/couchbase-lite-java-core
url = https://github.com/couchbase/couchbase-lite-java-core.git
[submodule "libraries/couchbase-lite-java-forestdb"]
path = libraries/couchbase-lite-java-forestdb
url = https://github.com/couchbaselabs/couchbase-lite-java-forestdb.git
url = https://github.com/hammerheadnav/couchbase-lite-java-core.git
branch = release/1.4.1
[submodule "libraries/couchbase-lite-java-native"]
path = libraries/couchbase-lite-java-native
url = https://github.com/couchbase/couchbase-lite-java-native
url = https://github.com/hammerheadnav/couchbase-lite-java-native
branch = release/1.4.1
104 changes: 60 additions & 44 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ version = System.getenv("MAVEN_UPLOAD_VERSION")
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.android.tools.build:gradle:3.6.4'
}
}

allprojects {
repositories {
google() // and here
jcenter()
}
}

Expand All @@ -21,13 +29,21 @@ repositories {
mavenCentral()
}

sourceSets {
main {
java.srcDirs = [
'src/main/java'
]
}
}

android {
compileSdkVersion 24
buildToolsVersion "24.0.0"

defaultConfig {
minSdkVersion 9
targetSdkVersion 24
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
Expand All @@ -37,6 +53,10 @@ android {
targetCompatibility JavaVersion.VERSION_1_6
}

sourceSets {
main.java.srcDirs += 'src/main/java'
}

buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
Expand All @@ -63,18 +83,14 @@ dependencies {
project(':libraries:couchbase-lite-java-core') :
'com.couchbase.lite:couchbase-lite-java-core:' + version

compile buildAndroidWithArtifacts == null ?
project(':libraries:couchbase-lite-java-native:sqlite-custom') :
'com.couchbase.lite:couchbase-lite-android-sqlite-custom:' + version
compile 'com.couchbase.lite:couchbase-lite-android-sqlite-custom:1.4.1'

// Libraries required for tests only:
androidTestCompile buildAndroidWithArtifacts == null ?
project(':libraries:couchbase-lite-java-native:sqlcipher') :
'com.couchbase.lite:couchbase-lite-android-sqlcipher:' + version
androidTestCompile 'com.couchbase.lite:couchbase-lite-android-sqlcipher:1.4.1'

androidTestCompile buildAndroidWithArtifacts == null ?
project(':libraries:couchbase-lite-java-forestdb') :
'com.couchbase.lite:couchbase-lite-android-forestdb:' + version
// androidTestCompile buildAndroidWithArtifacts == null ?
// project(':libraries:couchbase-lite-java-forestdb') :
// 'com.couchbase.lite:couchbase-lite-android-forestdb:' + version

androidTestCompile 'commons-io:commons-io:2.0.1'
androidTestCompile 'com.squareup.okhttp3:mockwebserver:3.3.1'
Expand Down Expand Up @@ -124,38 +140,38 @@ task createMavenDirectory(type: Exec) {
createMavenDirectory.onlyIf { System.getenv("MAVEN_UPLOAD_REPO_URL").contains("files") }

// first create the directory, then do the upload
task uploadArchivesWrapper(dependsOn: createMavenDirectory) << {
uploadArchives.execute()
}

def mavenPath() {
System.getenv("MAVEN_BUILD_LOCAL") == "true" ?
'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath :
System.getenv("MAVEN_UPLOAD_REPO_URL")
}

// this will upload, but will not first create a directory (which is needed on some servers)
uploadArchives {
repositories {
mavenDeployer {
repository(url: mavenPath()) {
authentication(userName: System.getenv("MAVEN_UPLOAD_USERNAME"), password: System.getenv("MAVEN_UPLOAD_PASSWORD"))
}
pom.version = System.getenv("MAVEN_UPLOAD_VERSION") != null ? System.getenv("MAVEN_UPLOAD_VERSION") : ''
pom.groupId = 'com.couchbase.lite'
pom.artifactId = 'couchbase-lite-android'
pom.project {
licenses {
license {
name 'Couchbase Community Edition License Agreement'
url 'http://www.couchbase.com/agreement/community'
distribution 'repo'
}
}
}
}
}
}
//task uploadArchivesWrapper(dependsOn: createMavenDirectory) << {
// uploadArchives.execute()
//}
//
//def mavenPath() {
// System.getenv("MAVEN_BUILD_LOCAL") == "true" ?
// 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath :
// System.getenv("MAVEN_UPLOAD_REPO_URL")
//}
//
//// this will upload, but will not first create a directory (which is needed on some servers)
//uploadArchives {
// repositories {
// mavenDeployer {
// repository(url: mavenPath()) {
// authentication(userName: System.getenv("MAVEN_UPLOAD_USERNAME"), password: System.getenv("MAVEN_UPLOAD_PASSWORD"))
// }
// pom.version = System.getenv("MAVEN_UPLOAD_VERSION") != null ? System.getenv("MAVEN_UPLOAD_VERSION") : ''
// pom.groupId = 'com.couchbase.lite'
// pom.artifactId = 'couchbase-lite-android'
// pom.project {
// licenses {
// license {
// name 'Couchbase Community Edition License Agreement'
// url 'http://www.couchbase.com/agreement/community'
// distribution 'repo'
// }
// }
// }
// }
// }
//}


task sourcesJar(type: Jar) {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Aug 18 12:13:56 PDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
109 changes: 66 additions & 43 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,25 +1,59 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand All @@ -30,6 +64,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -40,26 +75,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
Expand All @@ -85,7 +105,7 @@ location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
Expand All @@ -105,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down Expand Up @@ -134,27 +154,30 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
exec "$JAVACMD" "$@"
Loading

0 comments on commit c0f5906

Please sign in to comment.