Skip to content
This repository was archived by the owner on Mar 10, 2022. It is now read-only.

Commit 0127b33

Browse files
committed
Update tooling
Change-Id: I8a626302728900873c51d96009ab6108e1c6c80b
1 parent e96638d commit 0127b33

File tree

4 files changed

+23
-10
lines changed

4 files changed

+23
-10
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildscript {
1818
ext {
1919
COMPILE_SDK_VERSION = 29
2020
BUILD_TOOLS_VERSION = "29.0.3"
21-
KOTLIN_VERSION = '1.3.61'
21+
KOTLIN_VERSION = '1.3.70'
2222
JACOCO_VERSION = '0.8.4'
2323

2424
PROJECT_DIR = "${projectDir}"
@@ -33,7 +33,7 @@ buildscript {
3333

3434
dependencies {
3535
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
36-
classpath 'com.android.tools.build:gradle:3.5.3'
36+
classpath 'com.android.tools.build:gradle:3.6.1'
3737
classpath "org.jacoco:org.jacoco.core:$JACOCO_VERSION"
3838
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.3'
3939
classpath "com.github.spotbugs:spotbugs-gradle-plugin:3.0.0"

etc/jenkins/build.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ GROUP='com.couchbase.lite'
55
PRODUCT='coucbase-lite-android'
66
EDITION='community'
77

8+
# These versions must match the versions in lib/build.gradle
9+
NDK_VERSION='20.1.5948944'
10+
CMAKE_VERSION='3.10.2.4988404'
11+
812
MAVEN_URL="http://mobile.maven.couchbase.com/maven2/cimaven"
913

1014

@@ -34,14 +38,14 @@ echo "======== BUILD Couchbase Lite Android, Community Edition v`cat ../version.
3438
echo "======== Install Toolchain"
3539
yes | ${SDK_MGR} --licenses > /dev/null 2>&1
3640
${SDK_MGR} --install 'build-tools;29.0.3'
37-
${SDK_MGR} --install 'cmake;3.10.2.4988404'
38-
${SDK_MGR} --install 'ndk;20.1.5948944'
41+
${SDK_MGR} --install "cmake;${CMAKE_VERSION}"
42+
${SDK_MGR} --install "ndk;${NDK_VERSION}"
3943

4044
# The Jenkins script has already put passwords into local.properties
4145
cat <<EOF >> local.properties
4246
sdk.dir=${SDK_HOME}
43-
ndk.dir=${SDK_HOME}/ndk/20.1.5948944
44-
cmake.dir=${SDK_HOME}/cmake/3.10.2.4988404
47+
ndk.dir=${SDK_HOME}/ndk/${NDK_VERSION}
48+
cmake.dir=${SDK_HOME}/cmake/${CMAKE_VERSION}
4549
EOF
4650

4751
echo "======== Build"

etc/jenkins/publish.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ if [ -z "$WORKSPACE" ]; then
3838
fi
3939

4040
echo "======== Publish candidate build to internal maven"
41+
## Really should promote the existing package, instead of re-publishing
42+
## Something like this:
43+
## curl -X POST -H "Content-Type: application/json" \
44+
## --data '{"API_Key": "<promote key>", "groupName": "com.couchbase.lite", "packageName": "couchbase-lite-android", "version": "2.7.0-43", "fromFeed": "cimaven", "toFeed": "internalmaven"}' \
45+
## http://mobile.maven.couchbase.com/api/promotions/promote
46+
## At present that call fails to promote the entire package (bad PK copying the source tar)
47+
## so, for now, just republish the same bits.
4148
./gradlew ciPublish -PbuildNumber=${BUILD_NUMBER} -PmavenUrl=${MAVEN_URL} || exit 1
4249

4350
echo "======== Copy artifacts to staging directory"
@@ -72,3 +79,4 @@ zip -r "${ARTIFACTS}/${PRODUCT}-${VERSION}-android_${EDITION}.zip" * || exit 1
7279
popd
7380

7481
echo "======== PUBLICATION COMPLETE"
82+

lib/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ version = BUILD_VERSION
9494
android {
9595
compileSdkVersion COMPILE_SDK_VERSION
9696
buildToolsVersion BUILD_TOOLS_VERSION
97+
// if you change this, be sure to update /etc/jenkins/build.sh
9798
ndkVersion '20.1.5948944'
9899

99100
defaultConfig {
@@ -125,6 +126,8 @@ android {
125126
}
126127

127128
buildTypes {
129+
// NOTE: testCoverageEnabled is managed in the `coverage` task
130+
128131
debug {
129132
buildConfigField "String", "BUILD_TIME", "\"${BUILD_TIME}\""
130133
buildConfigField "String", "BUILD_COMMIT", "\"${BUILD_COMMIT}\""
@@ -133,16 +136,13 @@ android {
133136

134137
debuggable true
135138
minifyEnabled false
136-
testCoverageEnabled false
137139

138140
externalNativeBuild {
139141
cmake {
140142
arguments '-DANDROID_STL=c++_static', "-DANDROID_TOOLCHAIN=clang", '-DANDROID_PLATFORM=android-19', '-DCMAKE_BUILD_TYPE=Debug'
141143
cppFlags "-std=c++11 -frtti -fexceptions -fPIC"
142144
}
143145
}
144-
145-
// testCoverageEnabled is enabled in the `coverage` task
146146
}
147147

148148
release {
@@ -166,6 +166,7 @@ android {
166166

167167
externalNativeBuild {
168168
cmake {
169+
// if you change this, be sure to update /etc/jenkins/build.sh
169170
version "3.10.2"
170171
path "${CBL_JNI_DIR}/CMakeLists.txt"
171172
}
@@ -413,8 +414,8 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
413414
// Generate source.jar
414415
task sourcesJar(type: Jar) {
415416
archiveBaseName = "${CBL_ARTIFACT_ID}"
416-
from android.sourceSets.main.java.srcDirs
417417
archiveClassifier = 'sources'
418+
from android.sourceSets.main.java.srcDirs
418419
}
419420

420421
artifacts {

0 commit comments

Comments
 (0)