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

[wish] Instructions for changing AndroidSample to something else #1

Closed
jam1401 opened this issue May 1, 2014 · 2 comments
Closed
Labels

Comments

@jam1401
Copy link

jam1401 commented May 1, 2014

This looks like really promising work. I pulled the base repo and worked fine, but when I tried to rename the AndroidSample directory and module it went a bit pair shaped. Could not get the ComponentTestRobolectric gradle to sync. This is the error..

./gradlew clean build --stacktrace
root project 'my-data-collector'project ':ComponentTestsRobolectric'project ':GenerateDatabaseContent'project ':MyDataCollector'project ':UnitTestsRobolectric'project ':ComponentTestsRobolectric'project ':GenerateDatabaseContent'project ':MyDataCollector'project ':UnitTestsRobolectric'
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/jeff/Documents/workspace/myData/android/my-data-collector/ComponentTestsRobolectric/build.gradle' line: 6

* What went wrong:
A problem occurred evaluating project ':ComponentTestsRobolectric'.
> The 'android' or 'android-library' plugin is required.

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating project ':ComponentTestsRobolectric'.
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:156)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:38)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:25)
    at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:507)
    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:82)
    at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:31)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)

I was hoping to find a way to do this so I might be able to script the creation of new projects from this base. Sticking with doing development in AndroidSample is a bit limiting..

Perhaps some instructions on either changing AndroidSample or adding a new Application module would be good. I will keep plugging away..

@nenick
Copy link
Owner

nenick commented May 2, 2014

Never before I comes in the situation that my main module was alphabetical later than test modules. Indeed this will produce your exception. So the trick is to ensure that test modules comes in alphabetical later as main project.

I also wrote down it to a wiki page.
https://github.com/nenick/android-gradle-template/wiki/Renaming-project-modules

@jam1401
Copy link
Author

jam1401 commented May 2, 2014

Excellent thanks...

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

No branches or pull requests

2 participants