couchbase / couchbase-lite-android-ce

The community edition of couchbase lite for android
Apache License 2.0
9 stars 1 forks source link

How to build specific version e.g. 2.6? #26

Closed K-Leon closed 5 years ago

K-Leon commented 5 years ago

I just tried to understand which commit version I need to build the official 2.6 Version from source.

Is there any easy way to get the proper commits or would it be possible to tag official releases?

bmeike commented 5 years ago

Yeah. We should do that.

I just looked around and I don't think that you can figure out, from the existing tags and branches, how to build a specific release.

Tracking in https://issues.couchbase.com/browse/CBL-402

K-Leon commented 5 years ago

Thank! Could you provide the commits for 2.6 beforehand? It would be extemely helpful

bmeike commented 5 years ago

Yeah. Will do today.

bmeike commented 5 years ago

This repo now has a branch named release/2.6.0. It should reproduce the 2.6 release.

K-Leon commented 5 years ago

Thanks! Even though i'm struggeling with the build. After checkout it won't find com.couchbase.lite.internal from com.couchbase.lite.*.

Maybe i'm missing something or something is off with the buildscripts.

cmp:couchbase-lite-android curuser$ ./gradlew assembleRelease

> Task :lib:compileReleaseJavaWithJavac FAILED
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/CouchbaseLite.java:37: error: cannot find symbol
import com.couchbase.lite.internal.ExecutionService;
                                  ^
  symbol:   class ExecutionService
  location: package com.couchbase.lite.internal
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/CouchbaseLite.java:38: error: package com.couchbase.lite.internal.fleece does not exist
import com.couchbase.lite.internal.fleece.MValue;
                                         ^
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/CouchbaseLite.java:39: error: package com.couchbase.lite.internal.support does not exist
import com.couchbase.lite.internal.support.Log;
                                          ^
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/CouchbaseLite.java:40: error: package com.couchbase.lite.internal.utils does not exist
import com.couchbase.lite.internal.utils.Preconditions;
                                        ^
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/CouchbaseLite.java:46: error: cannot find symbol
    private static final AtomicReference<ExecutionService> EXECUTION_SERVICE = new AtomicReference<>();
                                         ^
  symbol:   class ExecutionService
  location: class CouchbaseLite
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/CouchbaseLite.java:73: error: cannot find symbol
    public static ExecutionService getExecutionService() {
                  ^
  symbol:   class ExecutionService
  location: class CouchbaseLite
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/ConsoleLogger.java:28: error: cannot find symbol
public final class ConsoleLogger extends AbstractConsoleLogger {
                                         ^
  symbol: class AbstractConsoleLogger
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/ConsoleLogger.java:30: error: cannot find symbol
    protected void doLog(LogLevel level, @NonNull LogDomain domain, @NonNull String message) {
                         ^
  symbol:   class LogLevel
  location: class ConsoleLogger
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/ConsoleLogger.java:30: error: cannot find symbol
    protected void doLog(LogLevel level, @NonNull LogDomain domain, @NonNull String message) {
                                                  ^
  symbol:   class LogDomain
  location: class ConsoleLogger
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/internal/AndroidExecutionService.java:28: error: package com.couchbase.lite.internal.utils does not exist
import com.couchbase.lite.internal.utils.Preconditions;
                                        ^
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/internal/AndroidExecutionService.java:34: error: cannot find symbol
public final class AndroidExecutionService extends AbstractExecutionService {
                                                   ^
  symbol: class AbstractExecutionService
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/internal/AndroidExecutionService.java:80: error: cannot find symbol
    public Cancellable postDelayedOnExecutor(long delayMs, @NonNull Executor executor, @NonNull Runnable task) {
           ^
  symbol:   class Cancellable
  location: class AndroidExecutionService
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/internal/AndroidExecutionService.java:98: error: cannot find symbol
    public void cancelDelayedTask(@NonNull Cancellable cancellableTask) {
                                           ^
  symbol:   class Cancellable
  location: class AndroidExecutionService
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/internal/AndroidExecutionService.java:35: error: cannot find symbol
    private static class CancellableTask implements Cancellable {
                                                    ^
  symbol:   class Cancellable
  location: class AndroidExecutionService
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/internal/replicator/CBLWebSocket.java:26: error: cannot find symbol
import com.couchbase.lite.internal.core.C4Constants;
                                       ^
  symbol:   class C4Constants
  location: package com.couchbase.lite.internal.core
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/internal/replicator/CBLWebSocket.java:29: error: cannot find symbol
public class CBLWebSocket extends AbstractCBLWebSocket {
                                  ^
  symbol: class AbstractCBLWebSocket
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/NetworkReachabilityManager.java:27: error: package com.couchbase.lite.internal.support does not exist
import com.couchbase.lite.internal.support.Log;
                                          ^
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/NetworkReachabilityManager.java:33: error: cannot find symbol
final class NetworkReachabilityManager extends AbstractNetworkReachabilityManager {
                                               ^
  symbol: class AbstractNetworkReachabilityManager
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/NetworkReachabilityManager.java:35: error: cannot find symbol
    private static final LogDomain DOMAIN = LogDomain.REPLICATOR;
                         ^
  symbol:   class LogDomain
  location: class NetworkReachabilityManager
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/CouchbaseLite.java:59: error: cannot find symbol
        Preconditions.checkArgNotNull(ctxt, "context");
        ^
  symbol:   variable Preconditions
  location: class CouchbaseLite
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/CouchbaseLite.java:74: error: cannot find symbol
        ExecutionService executionService = EXECUTION_SERVICE.get();
        ^
  symbol:   class ExecutionService
  location: class CouchbaseLite
/Users/curuser/Documents/couchbase-lite-android-ce/couchbase-lite-android/lib/src/main/java/com/couchbase/lite/CouchbaseLite.java:113: error: cannot find symbol
        if (!load(libName)) { Log.e(LogDomain.DATABASE, "Cannot load native library"); }
bmeike commented 5 years ago

Arrg. Lemme try it...

bmeike commented 5 years ago

It just worked for me. Be sure you checkout release/2.6.0 and then do

 git submodule update --recursive --remote

It is easy to forget one or the other of those two switches...

bmeike commented 5 years ago

If you can confirm that you can build 2.6, I'd like to close this. We will add the rest of the tags, as tracked in https://issues.couchbase.com/browse/CBL-402

K-Leon commented 5 years ago

Yes it can be closed - sorry i didn't responded yet. Internesting would be also 2.5.3 due to the fact that upgrade 2.1 => 2.5 is broken

K-Leon commented 4 years ago

Is it possible to add 2.6.2 timely? I'm trying to find the proper commits, but it isn't easy.

Best Regards, Leon

K-Leon commented 4 years ago

@bmeike It would be awesome if you could look into this issue again! Thanks a lot!!

bmeike commented 4 years ago

@K-Leon thanks for the reminder. Definitely will do.