Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.Libpd:pd-for-android:1.1.0'
}
dependencies {
implementation("com.github.Libpd:pd-for-android:1.1.0")
}
<dependency>
<groupId>com.github.Libpd</groupId>
<artifactId>pd-for-android</artifactId>
<version>1.1.0</version>
</dependency>
libraryDependencies += "com.github.Libpd" % "pd-for-android" % "1.1.0"
:dependencies [[com.github.Libpd/pd-for-android "1.1.0"]]
- Try the chat for problems with setting up the library to work with your app
- For questions regarding libpd
Make sure you have Maven Central in your repositories:
allprojects {
repositories {
mavenCentral()
// ... other repositories
}
}
Add the dependency to your app:
dependencies {
implementation 'io.github.libpd.android:pd-core:1.2.1-rc6'
// ... other dependencies
}
Please note that pd-for-android depends on the vanilla version of Pure Data. Currently this is Pure Data vanilla version 0.51-3. You can get desktop distributions of it here: http://msp.ucsd.edu/software.html
If you're building the patch for your app using the extended distribution of Pure Data, or any other distribution that is not vanilla, you should be careful not to use PD objects that are not part of the vanilla distribution, because these will not work with libpd out of the box. It is however possible to add PD externals to your pd-for-android app. For a simple example as to how this could be done see the PdTest app in this repository, specifically the jni folder and the build.gradle file. If you take this path, you'll need to clone this repository and use it as the base folder for your app, similar to the way described in the following section on creating an .aar file.
cd pd-for-android
git submodule sync --recursive
git submodule update --init --recursive
gradlew
)./gradlew androidDependencies
./gradlew clean assembleRelease
Now you have your PdCore .aar file in the folder PdCore/build/outputs/aar
settings.gradle
from the pd-for-android root folder: File > New > Import Project...
cd PdCore/src/main/jni/libpd
git fetch && git checkout origin/master
git submodule update --init --recursive