├── .gitattributes
├── .gitignore
├── app
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── deviantdev
│ │ └── pdsampleproject
│ │ ├── MainActivity.java
│ │ └── PDSampleProjectApplication.java
│ └── res
│ ├── layout
│ ├── activity_main.xml
│ └── content_main.xml
│ ├── menu
│ └── menu_main.xml
│ ├── mipmap-hdpi
│ └── ic_launcher.png
│ ├── mipmap-mdpi
│ └── ic_launcher.png
│ ├── mipmap-xhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxxhdpi
│ └── ic_launcher.png
│ ├── raw
│ └── pdpatch.zip
│ ├── values-de
│ └── strings.xml
│ ├── values-v21
│ └── styles.xml
│ ├── values-w820dp
│ └── dimens.xml
│ └── values
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.gitignore.io/api/android,linux,macos,windows
2 |
3 | ### Android ###
4 | # Built application files
5 | *.apk
6 | *.ap_
7 |
8 | # Files for the ART/Dalvik VM
9 | *.dex
10 |
11 | # Java class files
12 | *.class
13 |
14 | # Generated files
15 | bin/
16 | gen/
17 | out/
18 |
19 | # Gradle files
20 | .gradle/
21 | build/
22 |
23 | # Local configuration file (sdk path, etc)
24 | local.properties
25 |
26 | # Proguard folder generated by Eclipse
27 | proguard/
28 |
29 | # Log Files
30 | *.log
31 |
32 | # Android Studio Navigation editor temp files
33 | .navigation/
34 |
35 | # Android Studio captures folder
36 | captures/
37 |
38 | # Keystore files
39 | *.jks
40 |
41 | # External native build folder generated in Android Studio 2.2 and later
42 | .externalNativeBuild
43 |
44 | ## Android Patch ##
45 | gen-external-apklibs
46 |
47 | ### Intellij+iml ###
48 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
49 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
50 |
51 | ## Intellij+iml Patch ##
52 | # Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
53 |
54 | .idea/
55 | *.iml
56 | *.ipr
57 | modules.xml
58 |
59 | ## File-based project format:
60 | *.iws
61 |
62 | ## Plugin-specific files:
63 |
64 | # IntelliJ
65 | /out/
66 |
67 | # JIRA plugin
68 | atlassian-ide-plugin.xml
69 |
70 | # Crashlytics plugin (for Android Studio and IntelliJ)
71 | com_crashlytics_export_strings.xml
72 | crashlytics.properties
73 | crashlytics-build.properties
74 | fabric.properties
75 |
76 | ### Operating System ###
77 |
78 |
79 | ## Linux ##
80 | *~
81 |
82 | # temporary files which can be created if a process still has a handle open of a deleted file
83 | .fuse_hidden*
84 |
85 | # KDE directory preferences
86 | .directory
87 |
88 | # Linux trash folder which might appear on any partition or disk
89 | .Trash-*
90 |
91 | # .nfs files are created when an open file is removed but is still being accessed
92 | .nfs*
93 |
94 |
95 | ## macOS ##
96 | *.DS_Store
97 | .AppleDouble
98 | .LSOverride
99 |
100 | # Icon must end with two \r
101 | Icon
102 |
103 |
104 | # Thumbnails
105 | ._*
106 |
107 | # Files that might appear in the root of a volume
108 | .DocumentRevisions-V100
109 | .fseventsd
110 | .Spotlight-V100
111 | .TemporaryItems
112 | .Trashes
113 | .VolumeIcon.icns
114 | .com.apple.timemachine.donotpresent
115 |
116 | # Directories potentially created on remote AFP share
117 | .AppleDB
118 | .AppleDesktop
119 | Network Trash Folder
120 | Temporary Items
121 | .apdisk
122 |
123 |
124 | ## Windows ##
125 |
126 | # Windows image file caches
127 | Thumbs.db
128 | ehthumbs.db
129 |
130 | # Folder config file
131 | Desktop.ini
132 |
133 | # Recycle Bin used on file shares
134 | $RECYCLE.BIN/
135 |
136 | # Windows Installer files
137 | *.cab
138 | *.msi
139 | *.msm
140 | *.msp
141 |
142 | # Windows shortcuts
143 | *.lnk
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.3"
6 |
7 | defaultConfig {
8 | applicationId "com.deviantdev.pdsampleproject"
9 | minSdkVersion 19
10 | targetSdkVersion 24
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | testCompile 'junit:junit:4.12'
25 | compile 'com.android.support:appcompat-v7:24.2.1'
26 | compile 'com.android.support:design:24.2.1'
27 |
28 | compile 'org.puredata.android:pd-core:1.0.1'
29 | }
30 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\hschu\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deviantdev/pdsampleproject/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.deviantdev.pdsampleproject;
2 |
3 | import android.content.ComponentName;
4 | import android.content.Intent;
5 | import android.content.ServiceConnection;
6 | import android.net.Uri;
7 | import android.os.Bundle;
8 | import android.os.IBinder;
9 | import android.support.design.widget.FloatingActionButton;
10 | import android.support.v7.app.AppCompatActivity;
11 | import android.util.Log;
12 | import android.view.Menu;
13 | import android.view.MenuItem;
14 | import android.view.MotionEvent;
15 | import android.view.View;
16 | import android.widget.Button;
17 | import android.widget.CompoundButton;
18 | import android.widget.SeekBar;
19 | import android.widget.Toast;
20 | import android.widget.ToggleButton;
21 |
22 | import org.puredata.android.io.AudioParameters;
23 | import org.puredata.android.service.PdService;
24 | import org.puredata.android.utils.PdUiDispatcher;
25 | import org.puredata.core.PdBase;
26 | import org.puredata.core.utils.IoUtils;
27 |
28 | import java.io.File;
29 | import java.io.IOException;
30 |
31 | public class MainActivity extends AppCompatActivity {
32 |
33 | private static final String TAG = "PDSampleProject";
34 |
35 | Button btnPlaySound;
36 | ToggleButton btnToggleSound;
37 | SeekBar seekbarFrequency;
38 | SeekBar seekbarVolume;
39 |
40 | /**
41 | * The PdService is provided by the pd-for-android library.
42 | */
43 | private PdService pdService = null;
44 |
45 | /**
46 | * The volume value as integer from 0 to 100 percent
47 | */
48 | int volume = 0;
49 |
50 | /**
51 | * Initialises the pure data service for playing audio and receiving control commands.
52 | */
53 | private final ServiceConnection pdConnection = new ServiceConnection() {
54 | @Override
55 | public void onServiceConnected(ComponentName name, IBinder service) {
56 | pdService = ((PdService.PdBinder)service).getService();
57 | initPd();
58 |
59 | try {
60 | int sampleRate = AudioParameters.suggestSampleRate();
61 | pdService.initAudio( sampleRate, 0, 2, 8 );
62 | pdService.startAudio();
63 | } catch (IOException e) {
64 | toast(e.toString());
65 | }
66 | }
67 |
68 | @Override
69 | public void onServiceDisconnected(ComponentName name) {
70 | pdService.stopAudio();
71 | }
72 | };
73 |
74 | /**
75 | * Initialises the pure data audio interface and loads the patch file packaged within the app.
76 | */
77 | @SuppressWarnings("ResultOfMethodCallIgnored")
78 | private void initPd() {
79 | File patchFile = null;
80 | try {
81 | PdBase.setReceiver(new PdUiDispatcher());
82 | PdBase.subscribe("android");
83 | File dir = getFilesDir();
84 | IoUtils.extractZipResource( getResources().openRawResource( R.raw.pdpatch ), dir, true );
85 | patchFile = new File( dir, "pdpatch.pd" );
86 | PdBase.openPatch( patchFile.getAbsolutePath() );
87 | } catch (IOException e) {
88 | Log.e(TAG, e.toString());
89 | finish();
90 | } finally {
91 | if (patchFile != null) {
92 | patchFile.delete();
93 | }
94 | }
95 | }
96 |
97 | @Override
98 | protected void onCreate(Bundle savedInstanceState) {
99 | super.onCreate(savedInstanceState);
100 | setContentView(R.layout.activity_main);
101 |
102 | AudioParameters.init(this);
103 | bindService(new Intent(this, PdService.class), pdConnection, BIND_AUTO_CREATE);
104 |
105 | initGui();
106 | }
107 |
108 | @Override
109 | protected void onDestroy() {
110 | super.onDestroy();
111 | try {
112 | unbindService(pdConnection);
113 | } catch (IllegalArgumentException e) {
114 | pdService = null;
115 | }
116 | }
117 |
118 | @Override
119 | public boolean onCreateOptionsMenu( Menu menu ) {
120 | getMenuInflater().inflate( R.menu.menu_main, menu );
121 | return true;
122 | }
123 |
124 | @Override
125 | public boolean onOptionsItemSelected( MenuItem item ) {
126 | int id = item.getItemId();
127 |
128 | if ( id == R.id.action_link ) {
129 | Intent browserIntent = new Intent( Intent.ACTION_VIEW, Uri.parse( "http://www.journal.deviantdev.com/example-libpd-android-studio/" ) );
130 | startActivity( browserIntent );
131 | return true;
132 | }
133 |
134 | if ( id == R.id.action_exit ) {
135 | moveTaskToBack( true );
136 | return true;
137 | }
138 |
139 | return super.onOptionsItemSelected( item );
140 | }
141 |
142 | /**
143 | * Initialises the user interface elements and necessary handlers responsibly for the interaction with the
144 | * pre-loaded pure data patch. The code is really pure data patch specific.
145 | */
146 | private void initGui() {
147 | // touch to play button
148 | this.btnPlaySound = (Button) findViewById( R.id.buttonPlaySound );
149 | this.btnPlaySound.setOnTouchListener( new View.OnTouchListener() {
150 | @Override
151 | public boolean onTouch( View v, MotionEvent event ) {
152 | if ( event.getAction() == MotionEvent.ACTION_DOWN ) {
153 | PdBase.sendFloat( "osc_volume", volume / 100f ); // send volume (0 to 1)
154 | } else if ( event.getAction() == MotionEvent.ACTION_UP ) {
155 | PdBase.sendFloat( "osc_volume", 0 ); // quiet down
156 | }
157 | return false;
158 | }
159 | } );
160 |
161 | // toggle play button
162 | this.btnToggleSound = (ToggleButton) findViewById( R.id.buttonToggleSound );
163 | this.btnToggleSound.setOnCheckedChangeListener( new CompoundButton.OnCheckedChangeListener() {
164 | @Override
165 | public void onCheckedChanged( CompoundButton buttonView, boolean isChecked ) {
166 |
167 | if ( btnPlaySound.isEnabled() ) {
168 | btnPlaySound.setEnabled( false );
169 | PdBase.sendFloat( "osc_volume", volume / 100f ); // enable volume while locked
170 | } else {
171 | btnPlaySound.setEnabled( true );
172 | PdBase.sendFloat( "osc_volume", 0 ); // quiet down for after unlock
173 | }
174 | }
175 | } );
176 |
177 | // seekbar for volume
178 | this.seekbarVolume = (SeekBar) findViewById( R.id.seekbarVolume );
179 | this.seekbarVolume.setMax( 100 );
180 | this.seekbarVolume.incrementProgressBy( 1 );
181 | this.seekbarVolume.setProgress( 0 );
182 | this.seekbarVolume.setOnSeekBarChangeListener( new SeekBar.OnSeekBarChangeListener() {
183 |
184 | public void onProgressChanged( SeekBar seekBar, int progress, boolean fromUser ) {
185 | volume = progress;
186 | if ( btnToggleSound.isChecked() ) {
187 | PdBase.sendFloat( "osc_volume", volume / 100f ); // send volume (0 to 1) if locked
188 | }
189 | }
190 |
191 | public void onStartTrackingTouch( SeekBar seekBar ) {}
192 |
193 | public void onStopTrackingTouch( SeekBar seekBar ) {}
194 | } );
195 |
196 | // seekbar for frequency
197 | this.seekbarFrequency = (SeekBar) findViewById( R.id.seekbarFrequency );
198 | this.seekbarFrequency.setMax( 100 );
199 | this.seekbarFrequency.incrementProgressBy( 1 );
200 | this.seekbarFrequency.setProgress( 0 );
201 | this.seekbarFrequency.setOnSeekBarChangeListener( new SeekBar.OnSeekBarChangeListener() {
202 | public void onProgressChanged( SeekBar seekBar, int progress, boolean fromUser ) {
203 | if ( progress == 0 ) progress = 1;
204 | float a = progress / 100f;
205 | float frequency = (float) ( 2500 * Math.exp( 2.19722 * a ) - 2500 );
206 | PdBase.sendFloat( "osc_pitch", frequency );
207 | }
208 |
209 | public void onStartTrackingTouch( SeekBar seekBar ) {}
210 |
211 | public void onStopTrackingTouch( SeekBar seekBar ) {}
212 | } );
213 |
214 | FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
215 | if ( fab != null ) {
216 | fab.setOnClickListener(new View.OnClickListener() {
217 | @Override
218 | public void onClick(View view) {
219 | Intent i = new Intent(Intent.ACTION_SEND);
220 | i.setType("message/rfc822");
221 | i.putExtra(Intent.EXTRA_EMAIL , new String[]{"contact@deviantdev.com"});
222 | i.putExtra( Intent.EXTRA_SUBJECT, "Mail to the Author...");
223 | i.putExtra(Intent.EXTRA_TEXT , "Thanks for all the fish!");
224 | try {
225 | startActivity(Intent.createChooser(i, "Send mail..."));
226 | } catch (android.content.ActivityNotFoundException ex) {
227 | Toast.makeText(MainActivity.this, "There are no email clients installed.", Toast.LENGTH_SHORT).show();
228 | }
229 | }
230 | });
231 | }
232 | }
233 |
234 | /**
235 | * Trigger a native Android toast message.
236 | * @param text
237 | */
238 | private void toast(final String text) {
239 | runOnUiThread(new Runnable() {
240 | @Override
241 | public void run() {
242 | Toast toast = Toast.makeText(getApplicationContext(), "", Toast.LENGTH_SHORT);
243 | toast.setText(TAG + ": " + text);
244 | toast.show();
245 | }
246 | });
247 | }
248 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/deviantdev/pdsampleproject/PDSampleProjectApplication.java:
--------------------------------------------------------------------------------
1 | package com.deviantdev.pdsampleproject;
2 |
3 | import android.app.Application;
4 | import android.content.res.Configuration;
5 | import android.content.res.Resources;
6 |
7 | import java.util.Locale;
8 |
9 | /**
10 | * App entry point to define some basic behaviour.
11 | */
12 | public class PDSampleProjectApplication extends Application {
13 |
14 | @Override
15 | public void onCreate() {
16 | initLanguageDebugMode("en");
17 | super.onCreate();
18 | }
19 |
20 | /**
21 | * Forces the app to use a specific language for development and debugging purposes.
22 | * @param language ISO 639 alpha-2 or alpha-3 language code. @see Locale
23 | */
24 | private void initLanguageDebugMode(String language) {
25 | Locale locale = new Locale(language);
26 | Locale.setDefault(locale);
27 |
28 | Configuration config = new Configuration();
29 | config.setLocale(locale);
30 |
31 | Resources res = getApplicationContext().getResources();
32 | res.updateConfiguration(config, res.getDisplayMetrics());
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
25 |
26 |
31 |
32 |
38 |
39 |
44 |
45 |
46 |
51 |
52 |
58 |
59 |
64 |
65 |
66 |
72 |
73 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devdev-dev/PureDataSampleProject/5d4f404a51bea9360afe5cfa035928aed65573f0/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devdev-dev/PureDataSampleProject/5d4f404a51bea9360afe5cfa035928aed65573f0/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devdev-dev/PureDataSampleProject/5d4f404a51bea9360afe5cfa035928aed65573f0/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devdev-dev/PureDataSampleProject/5d4f404a51bea9360afe5cfa035928aed65573f0/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devdev-dev/PureDataSampleProject/5d4f404a51bea9360afe5cfa035928aed65573f0/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/pdpatch.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devdev-dev/PureDataSampleProject/5d4f404a51bea9360afe5cfa035928aed65573f0/app/src/main/res/raw/pdpatch.zip
--------------------------------------------------------------------------------
/app/src/main/res/values-de/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Pure Data Beispielprojekt
4 | Info
5 | Beenden
6 |
7 | Passe die Parameter an!
8 | Lautstärke
9 | Frequenz
10 |
11 | Halten zum Klang erzeugen
12 | Permanente Klangausgabe: Aus
13 | Permanente Klangausgabe: An
14 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ff9800
4 | #BF7200
5 | #ff9800
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Pure Data Sample Project
4 | About
5 | Exit
6 |
7 | Adjust the parameters!
8 | Volume
9 | Frequency
10 |
11 | Play Sound on Hold
12 | Permanent Sound: Off
13 | Permanent Sound: On
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | jcenter()
4 | }
5 | dependencies {
6 | classpath 'com.android.tools.build:gradle:2.2.1'
7 | }
8 | }
9 |
10 | allprojects {
11 | repositories {
12 | jcenter()
13 | }
14 | }
15 |
16 | task clean(type: Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devdev-dev/PureDataSampleProject/5d4f404a51bea9360afe5cfa035928aed65573f0/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------