Skip to content
New issue

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

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

Already on GitHub? # to your account

Build automation #30

Open
bcr opened this issue Nov 18, 2014 · 5 comments
Open

Build automation #30

bcr opened this issue Nov 18, 2014 · 5 comments

Comments

@bcr
Copy link
Contributor

bcr commented Nov 18, 2014

Trying to come up with a plan for build automation. I think at least on OS X I can do:

xbuild /target:MaaasClientIOS /property:Configuration=Debug /property:Platform=iPhoneSimulator
xbuild /target:MaaasClientAndroid /property:Configuration=Debug

From the MaaasClient directory which I think builds the iOS and Android versions.

There are probably msbuild equivalent command lines for the Windows / Windows Phone versions. I don't think we can build all platforms on one build platform is the problem. There may be a way to configure remote building of iOS from Windows, but we will still need an iOS and a Windows dev platform available.

@bcr
Copy link
Contributor Author

bcr commented Jan 6, 2015

Latest exploration on OS X I can do:

xcodebuild -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO

For SynchroSwift, and:

./gradlew assembleRelease

For SynchroClientAndroid.

@bcr
Copy link
Contributor Author

bcr commented Apr 9, 2015

For unit tests I can do (will run simulator if not running)

xcodebuild test -scheme SynchroSwift -destination 'platform=iOS Simulator,name=iPhone 6'

To build and run unit tests on Android, with the emulator already running, use:

./gradlew connectedAndroidTest

@bcr
Copy link
Contributor Author

bcr commented Jun 13, 2015

For Windows / Windows Phone I was able to:

msbuild SynchroClientWin.WindowsPhone\SynchroClientWin.WindowsPhone.csproj /p:AppxPackageSigningEnabled=false
msbuild SynchroClientWin\SynchroClientWin.csproj /p:AppxPackageSigningEnabled=false

This article was useful. http://blogs.msdn.com/b/dsvc/archive/2014/02/17/using-msbuild-to-build-windows-store-application-without-signing-the-appxpackage.aspx

To select Debug / Release builds, we may need to use /property:Configuration=Debug|Release as required (pick one of "Debug" or "Release").

@bcr
Copy link
Contributor Author

bcr commented Aug 18, 2015

Not sure where to put this yet, this is the way I created the keystore for the Android app:

Blakes-MBP:Synchro blake$ keytool -genkey -v -keystore io.synchro.client.android.keystore -alias app -keyalg RSA -keysize 2048 -validity 10000
Enter keystore password:  
Re-enter new password: 
What is your first and last name?
  [Unknown]:  Synchro Explorer
What is the name of your organizational unit?
  [Unknown]:  
What is the name of your organization?
  [Unknown]:  Synchro Labs, Inc.
What is the name of your City or Locality?
  [Unknown]:  Redmond
What is the name of your State or Province?
  [Unknown]:  WA
What is the two-letter country code for this unit?
  [Unknown]:  US
Is CN=Synchro Explorer, OU=Unknown, O="Synchro Labs, Inc.", L=Redmond, ST=WA, C=US correct?
  [no]:  yes

Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 10,000 days
    for: CN=Synchro Explorer, OU=Unknown, O="Synchro Labs, Inc.", L=Redmond, ST=WA, C=US
Enter key password for <app>
    (RETURN if same as keystore password):  
[Storing io.synchro.client.android.keystore]

@bcr
Copy link
Contributor Author

bcr commented Aug 18, 2015

Commands for signing apk:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../../io.synchro.client.android.keystore app/build/outputs/apk/app-release-unsigned.apk app
~/Library/Developer/Xamarin/android-sdk-macosx/build-tools/21.0.1/zipalign -v 4 app/build/outputs/apk/app-release-unsigned.apk app/build/outputs/apk/app-release.apk

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant