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

Subsequent builds fail when using a signingConfig #386

Closed
ChaitanyaPramod opened this issue Feb 9, 2017 · 1 comment
Closed

Subsequent builds fail when using a signingConfig #386

ChaitanyaPramod opened this issue Feb 9, 2017 · 1 comment

Comments

@ChaitanyaPramod
Copy link

ChaitanyaPramod commented Feb 9, 2017

Gradle step fails when using buck the second time. Deleting .okbuck/keystore makes it work one more time.

Execution failed for task ':app:okbuck'.
> .okbuck/keystore/app/postLollipopDebug.keystore

Our signing config looks like this

    signingConfigs {
        prod {
            storeFile file(prod_keystore) // These values are defined in build.gradle
            storePassword prod_store_password
            keyAlias prod_key_alias
            keyPassword prod_key_password
        }
        debug {
            storeFile file(debug_keystore)
            storePassword debug_store_password
            keyAlias debug_key_alias
            keyPassword debug_key_password
        }
    }

    productFlavors {
        preKitkat {
        }
        postLollipop {
        }
    }

buildTypes {
        prod {
            // ...
            signingConfig signingConfigs.prod
        }

        debug {
            // ...
            signingConfig signingConfigs.debug
        }
    }

This is fairly reproducible in my environment.

EDIT (more notes):
Using okbuck 0.17.1
This happens even when :app:okbuck triggers :okbuckClean and :setupOkbuck
Same thing with app module in okbuck project as well with master (a27f9c7)

@cwoodwar6
Copy link
Contributor

I have the same issue, here is the stacktrace:

Caused by: java.nio.file.FileAlreadyExistsException: .okbuck/keystore/app/debug.keystore
        at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:551)
        at sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253)
        at java.nio.file.Files.copy(Files.java:1274)
        at sun.reflect.GeneratedMethodAccessor3732.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(StaticMetaMethodSite.java:46)
        at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:91)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
        at com.uber.okbuck.composer.android.KeystoreRuleComposer.compose(KeystoreRuleComposer.groovy:28)
        at com.uber.okbuck.composer.android.KeystoreRuleComposer$compose.call(Unknown Source)
        at com.uber.okbuck.generator.BuckFileGenerator.createRules(BuckFileGenerator.groovy:207)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
        at com.uber.okbuck.generator.BuckFileGenerator$_createRules_closure1.doCall(BuckFileGenerator.groovy:87)

A temporary workaround is rm -rf .okbuck

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

2 participants