Skip to content

This is a mono / java repository helping to build Xamarin Android or Xamarin Forms projects

License

Notifications You must be signed in to change notification settings

thegrizzlylabs/xamarin-android

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-xamarin-android

Docker image includes mono/java for building Xamarin Android or Xamarin Forms project in a CI container.

Docker Build Status

Installed Android SDK's v27 and v28 Installed build tools v27.0.3 and 28.0.3

This image uses the Android SDK so you should agree with the Android SDK license before usage (https://developer.android.com/studio/terms.html°

Example .gitlab-ci file

image: chiticariu/xamarin-android

stages:
    - build

before_script:
    - export BUILD_DATE=$(date +%Y%m%d%H%M%S)

build:
    stage: build
    only:
        - master
    artifacts:
      paths:
        - publish_android/*.apk
    script:
      - msbuild src/<solution_file_name>.sln /p:AndroidSdkDirectory=/android/sdk /p:AndroidNdkDirectory=/android/sdk/ndk-bundle /p:Configuration="Release" /p:Platform="Any CPU" /restore
      - msbuild src/<android_project_directory>/<android_project_file_name>.csproj /p:AndroidSdkDirectory=/android/sdk /p:AndroidNdkDirectory=/android/sdk/ndk-bundle /p:Configuration="Release" /p:Platform="Any CPU" /t:PackageForAndroid /p:OutputPath="../../publish_android/"
      - msbuild src/<android_project_directory>/<android_project_file_name>.csproj /p:AndroidSdkDirectory=/android/sdk /p:AndroidNdkDirectory=/android/sdk/ndk-bundle /p:Configuration="Release" /p:Platform="Any CPU" /t:SignAndroidPackage /p:OutputPath="../../publish_android/"

Extra helper command

  • Run docker image in terminal having the code mounted
Linux:    docker run -it -v $(pwd):/xamarin_project chiticariu/xamarin-android /bin/bash
Windows:  docker run -it -v %cd%:/xamarin_project chiticariu/xamarin-android /bin/bash

References: https://hub.docker.com/r/nathansamson/xamarin-android-docker

About

This is a mono / java repository helping to build Xamarin Android or Xamarin Forms projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 87.2%
  • Shell 12.8%