Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build android AAR SDK #178

Merged
merged 25 commits into from
Jul 27, 2018
Merged

Build android AAR SDK #178

merged 25 commits into from
Jul 27, 2018

Conversation

jenow
Copy link
Contributor

@jenow jenow commented Jul 23, 2018

What does this PR do ?

Build an AAR archive for android SDK.

How should this be manually tested?

docker run --rm -it --mount type=bind,source="$(pwd)",target=/go/src/github.com/kuzzleio/sdk-go kuzzleio/sdk-cross:android386 /build.sh
ls internal/wrappers/build/android/app/build/outputs/aar/app-release.aar && echo "Build ok" || echo "Build failed"

@jenow jenow self-assigned this Jul 23, 2018
@codecov-io
Copy link

codecov-io commented Jul 24, 2018

Codecov Report

Merging #178 into 1.x will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              1.x     #178   +/-   ##
=======================================
  Coverage   88.97%   88.97%           
=======================================
  Files         244      244           
  Lines        4410     4410           
=======================================
  Hits         3924     3924           
  Misses        454      454           
  Partials       32       32

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c2c2fbe...8ac74de. Read the comment docs.

@Aschen
Copy link
Contributor

Aschen commented Jul 25, 2018

I can't pull your image android386.
Can you push it to Dockerhub within the kuzzleio namespace ?

.travis.yml Outdated
@@ -15,6 +15,7 @@ script:
- docker run -a stdout -a stderr --net host --rm --privileged --name build-machine --mount type=bind,source="$(pwd)",target=/go/src/github.com/kuzzleio/sdk-go kuzzleio/sdk-cross:amd64 /build.sh
- sh .codepipeline/start_kuzzle.sh
- docker run -a stdout -a stderr --privileged --rm --network codepipeline_default --link kuzzle --name test-machine --mount type=bind,source="$(pwd)",target=/go/src/github.com/kuzzleio/sdk-go kuzzleio/sdk-cross:amd64 /test.sh
- docker run --rm -it --mount type=bind,source="$(pwd)",target=/go/src/github.com/kuzzleio/sdk-go kuzzleio/sdk-cross:android386 /build.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why "386" and not x86?
and what about arm and arm64?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

386 and x86 are the same?
arm and arm64 will be handled with the CI, this is just a first draft where we successfully compile the android SDK, there is more work to do to package the final AAR file which will embed x86, armeabi-v7a and armeabi-v8a

Copy link
Contributor

@scottinet scottinet Jul 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, 386 and x86 are not the same: x86 refer to 8086 CPUs, from 286 CPUs to to modern pentiums, which are also x64 (aka x86-64).
On the other hand, "386" refer only to CPU from the late eighties ;-)

So I think you should replace 386 with x86.

And 👍 for the remaining part of your message :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
I feel old now..

@jenow
Copy link
Contributor Author

jenow commented Jul 25, 2018

@Aschen it's weird you cannot pull it: https://hub.docker.com/r/kuzzleio/sdk-cross/tags/

.travis.yml Outdated
- sh .codepipeline/start_kuzzle.sh
- docker run --rm -it --mount type=bind,source="$(pwd)",target=/go/src/github.com/kuzzleio/sdk-go kuzzleio/sdk-cross:android-x86 /build.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace the old mount syntax --mount type=bind,source="$(pwd)",target=/go/src/github.com/kuzzleio/sdk-go by -v "$(pwd)":/go/src/github.com/kuzzleio/sdk-go
(Everywhere)

// from: 'https://raw.githubusercontent.com/nisrulz/JCenter/master/bintrayv1.gradle'
apply plugin: 'com.jfrog.bintray'

// task sourcesJar(type: Jar) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why keep theses comments ?

.travis.yml Outdated
- docker run -a stdout -a stderr --net host --rm --privileged --name build-machine -v "$(pwd)":/go/src/github.com/kuzzleio/sdk-go kuzzleio/sdk-cross:amd64 /build.sh
- docker run -a stdout -a stderr --privileged --rm --network codepipeline_default --link kuzzle --name test-machine -v "$(pwd)":/go/src/github.com/kuzzleio/sdk-go kuzzleio/sdk-cross:amd64 /test.sh
- docker run -a stdout -a stderr --privileged --rm --neté&work codepipeline_default --link kuzzle --name test-machine -v "$(pwd)":/go/src/github.com/kuzzleio/sdk-go kuzzleio/sdk-cross:amd64 /test.sh
Copy link
Contributor

@Aschen Aschen Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo --neté&work

@Aschen Aschen merged commit bf0c540 into 1.x Jul 27, 2018
@Aschen Aschen deleted the KZL-227-android-sdk-wrapper branch July 27, 2018 15:52
@jenow jenow mentioned this pull request Sep 10, 2018
scottinet pushed a commit that referenced this pull request Sep 11, 2018
* fix

* deploy on bintray

* wip

* symbolic link of io/kuzzle/sdk to src/main/java

* clean io folder

* force ln

* dynamically load .so and publish on bintray according to the architecture

* fix path in Makefile

* fix mkdir

* execute gradlew with sh

* fix Makefile

* update readme

* fix readme

* change java.library.path of cucumber

* rename void_result to error_result

* remove io folder on clean

* build cpp build

* compile missing sources

* do a go get before making core

* compile right sources for cpp

* cpp sdk test: phase 0

* build cucumber-cpp as cmake external project

* removed cucumber.wire file

* added build script to build cpp e2e tests

* small fixes...debuging

* added cucumber.wire config file

* fix updateSelf

* fix return in getCurrentUser cpp

* change cucumber timeout

* raised cucumber 'invoke' timeout

* fixed build: fixed tests weren't building anymore

cucumber-cpp changed their build, introduicing the need for another
include path to ensure we can find new generated header CukeExport.hpp

* remove pointers type on KuzzleError

* fix tests

* new e2e scenarios

* e2e test on auth controller for java + fixes

* more passings tests

* e2e tests on realtime

* fix unit test

* build: workaround to avoid having to launch build twice

* tests: added logout test

* fix test.py

* fix test.py

* remove comments

* added dependencie to python-dev

* add python to the all rule

* update README

* fix readme

* Update README.md

* add C++11 deependencie

* add cppflags

* add cppflags

* remove libraries

* change meta

* fix Makefile

* add python-dev as dependency

* add -y to apt

* add python3-dev as dependency

* use pkg-config

* add g++6 as dependency

* add g++6 as dependency

* wip

* remove auto

* remove auto

* remove auto

* csharp sdk

* update readme

* add mono-mcs dependency

* Remove pointer type on KuzzleError (#153)

* remove pointers type on KuzzleError

* add namespace

* c# namespace

* c# namespace

* update test

* update Makefile

* fix Makefile

* feature files: split feature files by tested feature

* change module name

* Update kuzzlesdk.h

removed const long

* enhance clean rule

* finalize e2e test

* update README

* wip

* wip

* wip

* csharp sdk for windows

* fix Makefile

* added gradlew scripts

* fix Makefile

* fix Makefile

* wip

* fixes from PR comments

* java e2e tests with fixes

* fix unit test

* java e2e test on index controller

* Launch Java SDK tests on CodePipeline (#146)

* Launch Java SDK tests on CodePipeline

Add Continuous Integration with CodePipeline running E2E and Unit Tests
for all languages

To manually test this branch :

- Choose .codepipeline/builds/*.yml matching your machine architecture and
replay all the steps.
- Go check CodePipeline last build status and logs on AWS

Other :
- Fix paths in `internal/wrappers/features/run*.sh` for CI environment.


* Add helper scripts
* Update codepipeline config

* java e2e collection controller

* fix tests

* wip

* wip

* fixes from PR comments

* fixes from pr

* fix from pr's comment

* fix CMakeLists.txt

* typo

* add header

* Fix C++ test execution

* Fix typos in test scripts
* Automatically change the testing kuzzle hostname according to the test execution environment (CI / dev machine)
* Add README.md directives

Add Continuous Integration with CodePipeline running E2E and Unit Tests
for all languages

To manually test this branch :

- Choose .codepipeline/build*.yml matching your machine architecture and
replay all the steps.
- Go check CodePipeline last build status and logs on AWS

Other :
- Fix paths in `internal/wrappers/features/run*.sh` for CI environment.

fix kuzzleio/kuzzle-backlog#232

Merge remote-tracking branch 'origin/java-deploy' into test-automation

Merge remote-tracking branch 'origin/1.x' into test-automation

Merge remote-tracking branch 'origin/java-deploy' into test-automation

Merge remote-tracking branch 'origin/1.x' into test-automation

Update codepipeline config

Fix hostname in step defs c++

Fix

Limit resources use

fix tests script c++

* Java e2e index controller (#162)

* fixes from pr's comments

* fixes from pr's comments

* fixes from pr's comments

* update swig for travis

* update travis.yml

* update swig binary in Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* run tests in docker

* fix makefile

* fix cpp build

* fix build cpp

* Java e2e collection controller (#163)

* java e2e collection controller

* fix from pr's comment

* fixes from pr's comments

* fixes from pr's comments

* fixes from pr's comments

* update swig for travis

* update travis.yml

* update swig binary in Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* run tests in docker

* fix makefile

* fix makefile

* fix cpp build

* fix build cpp

* fix scenario

* Update Travis CI (#166)

* Update Travis CI

* Clean test.sh
* Process Isolation using Docker images
* Include Wrappers E2E Tests

* Remove containers kill

* Collection first and second scenario

* e2e test of realtime controller in cpp sdk (#168)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* realtime e2e cpp

* fix memleak

* set refs to null

* comment content of kuzzle-sdk-steps

* fix

* fix

* fix

* KZL-114 : [C++] Index controller tests (#167)

* KZL-114 : [C++] Index controller tests
* Add regexp
* Put index steps in separate file
* Add BOOST_FAIL in exceptions

* Add steps for collection

* add running specific feature file

* pass options to create document

* update readme cpp sdk

* Updates for PR

* wip

* build for android

* add jar rule

* generate aar file including the so for arm abi

* wip

* fix return value for document controller (#171)

* wip

* add a max retry to connect

* Fix index#list to return the indexes list

* add java tests

* uncomment

* wip

* embed .so file in .jar file

* fix tests

* Fix collection tests

* Add document test (#170)

* wip

* wip

* wip

* fix mget

* remove debug

* remove debug

* uncomment

* Updates for PR

* remove reset of context values

* fix typo

* Add snapshot stage skeleton

* Add snapshot script and stage

* Improve travis.yml syntax

* Apply @scottinet requested changes

* build for android

* fix docker image name

* fix make java

* fix tests

* add gradlew

* fix tests

* add gradle

* fix tests

* fix tests

* Rename struct members for java getter/setter (#179)

* update copyright information

* rename docker image

* Change the type pf options.offline_mode (#180)

* add a mapping argument to existing collection.create methods

* oopsie

* Rename deprecated method ReplayQueue to PlayQueue (#182)

* Rename ReplayQueue to PlayQueue

* Replace --mount by -v (Docker)

* Fix functional tests

* typo

* Build android AAR SDK (#178)

* build for android

* add jar rule

* generate aar file including the so for arm abi

* build for android

* fix docker image name

* fix make java

* fix tests

* add gradlew

* fix tests

* add gradle

* rename docker image

* change build order

* working listener

* wrap document

* fix e2e tests

* fixes

* wrap Auth controller

* wrap collection controller

* typo

* typo

* Wrap Server controller for Android SDK (#189)

* wrap server controller

* add typemap for std::string*

* Add queryOptions when needed on Realtime controller's methods (#190)

* add queryOptions when needed in realtime controller

* added reference

* [KZL-275] Add Android build stage in Codepipeline

* Throw only possible exception in controller Index, Collection and Kuzzle object (#192)

* Add PluginImplementation + ExternalService errors

* WIP explicit exceptions

* Add explicit exceptions for Index, Collection and Kuzzle

* fix merge

* fix methods sig

* remove java templates

* [KZL-372] Add namespace kuzzleio for C structs (#187)

* [KZL-372] Fix namespace kuzzleio in C++

Co-Authored-By: Kévin Blondel <kblondel@kaliop.com>

* [KZL-372] Apply @scottinet requested changes

* [Fix] Change some char* to const char* (#194)

* [Fix] Change some char* to const char*

* Wrap Realtime controller for Android SDK (#191)

* add references to string parameters

* add queryOptions when needed in realtime controller

* added reference

* wrap realtime controller

* fix subscribe return value

* Wrap Listeners for android (#195)

* wrap EventListener

* wrap SubscribeListener

* wrap NotificationListener

* wrapped listeners

* fix test

* add namespace

* Remove autoconnect (#197)

* Remove connect from options struct

* Remove defaultIndex from options struct

* Remove default_index from destructors

* now use C++11

* port android listeners

* wrap of std::function

* fix C++ build

* update g++ to 4.9

* fix travis.yml

* add C++11 support to NDK compilation

* fix exceptions wrapping

* fix exceptions

* fix cpp tests

* use lambda in cpp tests and enable C++11 in cmake

* use lambda in e2e cpp tests

* fix tests

* Add custom WebviewClient (#196)

* add custom webviewclient

* pass Event as ref

* fix wrap

* fix wrap

* typemap for Event&

* remove unessessary code

* revert

* fix signatures

* fix signatures

* fix cpp test

* add

* fix from PR's comment

* use static_cast
@jenow jenow mentioned this pull request Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants