-
Notifications
You must be signed in to change notification settings - Fork 12
Integrating this library
payne911 edited this page Oct 6, 2020
·
2 revisions
To include PieMenu into your applications, you can follow these easy steps.
To integrate this project in your own gradle project, add the version number and jitpack repository information to your root build.gradle
file:
allprojects {
ext {
...
pieMenuVersion = '5.0.0' // add this line
}
repositories {
...
maven { url 'https://jitpack.io' } // add this line if it isn't there
}
}
And in your core
project (still inside the root build.gradle
) add the dependency:
project(":core") {
apply plugin: "java-library"
dependencies {
...
api "com.github.payne911:PieMenu:$pieMenuVersion" // add this line
}
}
See the jitpack website for more info.
Since this project uses ShapeDrawer internally (for efficiency reasons), you need to tweak your root build.gradle
by adding:
allprojects {
ext {
...
shapedrawerVersion = '2.3.0' // add this line
}
...
}
project(":html") {
apply plugin: "java-library"
apply plugin: "gwt"
apply plugin: "war"
dependencies {
...
implementation "space.earlygrey:shapedrawer:$shapedrawerVersion:sources" // add this line
api "com.github.payne911:PieMenu:$pieMenuVersion:sources" // add this line
}
}
Then add the following line in your html
module's GdxDefinition.gwt.xml
:
<module rename-to="html">
<inherits name="PieMenu"/> <!-- add this line -->
</module>
Since this project uses default methods in interfaces, you need to tweak you android
module's build.gradle
file:
android {
...
// add the following:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
See Use Java 8 language features and APIs for more details.