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

AndroidPackage command rebuild the droid project #4

Open
rroman81 opened this issue Sep 19, 2016 · 2 comments
Open

AndroidPackage command rebuild the droid project #4

rroman81 opened this issue Sep 19, 2016 · 2 comments

Comments

@rroman81
Copy link

I have cake a task set up to build the Android Package that is dependent on the Build task. In the build task, i use MSBUILD with "Build" target. Then, in the android package command i would only want to package and not rebuild by the default.
Here is my PackageAndroid Task:

  .IsDependentOn("Build")
  .Does(() => 
{
  AndroidPackage("./src/DroidProject/Droid.csproj", true, 
    setting => 
        setting
        .SetConfiguration(configuration)
        .Targets
        .WithProperty("OutputPath","./artifacts/")
        .WithProperty("Platform",targetPlatform.ToString()));


});
This rebuilds the project it seems ... doesn't it support to run an appropriate project target for packaging?  Also, i would welcome any other pointers how to actually sign the package using an existing key (i already have created the keystore).
@jzeferino
Copy link
Member

Try this:

Task("Release-Android")	
    .Does(() =>
	{ 		
	AndroidPackage("./src/DroidProject/Droid.csproj", true, 
        setting => setting
        .SetConfiguration(configuration)
        .WithProperty("OutputPath","./artifacts/")
        .WithProperty("Platform",targetPlatform.ToString()))
        .WithProperty("AndroidKeyStore", "true")
        .WithProperty("AndroidSigningStorePass", keyStorePassword)
        .WithProperty("AndroidSigningKeyStore", keyStore)
        .WithProperty("AndroidSigningKeyAlias", keyStoreAlias)
        .WithProperty("AndroidSigningKeyPass", keyStorePassword)
        .WithProperty("TreatWarningsAsErrors", "false")
        .SetVerbosity(Verbosity.Verbose));           
    });

@Xavrugmuz
Copy link

Hi,
Don't you have an Issue with this AndroidPackage command? On my side I have an issue because it seems that AndroidPackage command uses 'GetDirectory' method. It seems that it tries to acces folders like 'C:\Documents end Settings'. On new versions of Windows, this folder doesn't exist anymore but is just a link to user folder. As a result, executing AndroidPackage command gives me an error like "Access to the path 'C:\Documents and Settings' is denied.
The .APK is created but the Cake process is stopped and I can't go further, for example launching unit test or what else with the build.cake script.
Does anyone has an idea about this issue and how to solve it?
Thank you per advance, I am blocked.
Xavier.

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

No branches or pull requests

3 participants