acefalobi / android-stepper

A library for creating a wizard-like step-through user interface that uses navigation components and menus for displaying steps with advanced customization.
Apache License 2.0
325 stars 38 forks source link

How to run the library locally? #19

Open mspnr opened 3 years ago

mspnr commented 3 years ago

I just stumbled on this problem. If I want to change a thing or two in the library and can attach to my app project it directly using the file system like this:

Add to settings.gradle

include ':android-stepper'
project(':android-stepper').projectDir = new File('../android-stepper/stepper')

Add to app/build.dependencies

dependencies {
  implementation project(':android-stepper')

With your library it does not work. Currently I am able to run it from maven version only.

Can you please describe how to a attach Android Stepper to an app project locally?

acefalobi commented 3 years ago

What is the issue when you try to do this?

mspnr commented 3 years ago

Here you are. This error is coming out after performing all operations described above and doing gradle sync:

org.gradle.internal.exceptions.LocationAwareException: Build file '.../android-stepper/stepper/build.gradle.kts' line: 9
Script compilation error:

  Line 9:     id(PluginDependencies.ANDROID_MAVEN)
                 ^ Unresolved reference: PluginDependencies

The problem is obviously, that PluginDependencies is not accessible from the project, only stepper does. PluginDependencies is though defined in buildSrc folder. Should it also be included to the new project, why and how? This is not clear.

acefalobi commented 3 years ago

Yes, you'll need to add the Dependencies.kt file from the stepper project into your own project.

mspnr commented 3 years ago

What do you mean by adding Dependencies.kt to my project?

Do you mean simply copy android-stepper/buildSrc/src/main/java/Dependencies.kt to MyApplication/app/src/main/java/com/example/myapplication/Dependencies.kt? Or there is another way to do it, e.g. as a reference?

Anyway copying does not work, the error stays the same.

acefalobi commented 3 years ago

No, I meant copying it to your buildSrc module (if you have one).

mspnr commented 3 years ago

Nope, I don't have buildSrc in my project. I created my project by selecting in Android Studio: New project / Phone or tablet / Empty activity. All other settings are left as suggested by Android Studio. What do you suggest to do?

acefalobi commented 3 years ago

In that case, I would suggest you create a buildSrc module or copy the contents of Dependencies.kt into the stepper build.gradle.kts

KeeganDC commented 2 years ago

Did anyone manage to import the library folder as an external module successfully? I have the same issues as OP

acefalobi commented 2 years ago

What exact issues did you have @NageekDC ?