To use ShapeView, you must first configure the JitPack repository and then add the dependencies. The repository configuration method depends on your Gradle version.
1. Configure JitPack Repository
For Gradle versions below 7.0:
Add the following to your root build.gradle file:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
For Gradle versions 7.0 or above:
Add the following to your settings.gradle file:
dependencyResolutionManagement {
repositories {
maven { url 'https://jitpack.io' }
}
}
2. Add Dependencies
In your app-level build.gradle file, ensure you support JDK 1.8 and add the ShapeView and ShapeDrawable libraries:
android {
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'com.github.getActivity:ShapeView:11.0'
implementation 'com.github.getActivity:ShapeDrawable:5.0'
}
implementation 'com.github.getActivity:ShapeView:11.0'
implementation 'com.github.getActivity:ShapeDrawable:5.0'