Browse Source

Initial commit, huge WIP.

native_fp
Andrew Comminos 7 years ago
commit
e5fc517693
30 changed files with 31450 additions and 0 deletions
  1. +11
    -0
      .gitignore
  2. +28
    -0
      Jumble/build.gradle
  3. BIN
      Jumble/libs/android-support-v4.jar
  4. +293
    -0
      Jumble/src/Mumble.proto
  5. +12
    -0
      Jumble/src/main/AndroidManifest.xml
  6. +26
    -0
      Jumble/src/main/aidl/com/morlunk/jumble/IJumbleObserver.aidl
  7. +32
    -0
      Jumble/src/main/aidl/com/morlunk/jumble/IJumbleService.aidl
  8. +19
    -0
      Jumble/src/main/aidl/com/morlunk/jumble/JumbleParams.aidl
  9. +19
    -0
      Jumble/src/main/aidl/com/morlunk/jumble/model/Channel.aidl
  10. +19
    -0
      Jumble/src/main/aidl/com/morlunk/jumble/model/Server.aidl
  11. +19
    -0
      Jumble/src/main/aidl/com/morlunk/jumble/model/User.aidl
  12. +23
    -0
      Jumble/src/main/java/com/morlunk/jumble/Constants.java
  13. +94
    -0
      Jumble/src/main/java/com/morlunk/jumble/JumbleParams.java
  14. +55
    -0
      Jumble/src/main/java/com/morlunk/jumble/JumbleService.java
  15. +93
    -0
      Jumble/src/main/java/com/morlunk/jumble/model/Channel.java
  16. +32
    -0
      Jumble/src/main/java/com/morlunk/jumble/model/ChannelManager.java
  17. +63
    -0
      Jumble/src/main/java/com/morlunk/jumble/model/Server.java
  18. +76
    -0
      Jumble/src/main/java/com/morlunk/jumble/model/User.java
  19. +66
    -0
      Jumble/src/main/java/com/morlunk/jumble/net/JumbleConnection.java
  20. +85
    -0
      Jumble/src/main/java/com/morlunk/jumble/net/JumbleSSLSocketFactory.java
  21. +29867
    -0
      Jumble/src/main/java/com/morlunk/jumble/protobuf/Mumble.java
  22. +2
    -0
      Jumble/src/main/res/values/strings.xml
  23. +20
    -0
      Jumble/src/main/res/values/styles.xml
  24. +202
    -0
      LICENSE
  25. +1
    -0
      build.gradle
  26. BIN
      gradle/wrapper/gradle-wrapper.jar
  27. +22
    -0
      gradle/wrapper/gradle-wrapper.properties
  28. +164
    -0
      gradlew
  29. +90
    -0
      gradlew.bat
  30. +17
    -0
      settings.gradle

+ 11
- 0
.gitignore View File

@@ -0,0 +1,11 @@
# Gradle / Android Studio
Jumble/build/
.idea/
.gradle/
*.iml

# Android
local.properties

# Java
*.class

+ 28
- 0
Jumble/build.gradle View File

@@ -0,0 +1,28 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'

repositories {
mavenCentral()
}

dependencies {
compile files('libs/android-support-v4.jar')
compile group:'com.google.protobuf', name:'protobuf-java', version:'2.5.0'
}

android {
compileSdkVersion 17
buildToolsVersion "17.0.0"

defaultConfig {
minSdkVersion 7
targetSdkVersion 17
}
}

BIN
Jumble/libs/android-support-v4.jar View File


+ 293
- 0
Jumble/src/Mumble.proto View File

@@ -0,0 +1,293 @@
package MumbleProto;
option java_package = "com.morlunk.jumble.protobuf";

option optimize_for = SPEED;

message Version {
optional uint32 version = 1;
optional string release = 2;
optional string os = 3;
optional string os_version = 4;
}

message UDPTunnel {
required bytes packet = 1;
}

message Authenticate {
optional string username = 1;
optional string password = 2;
repeated string tokens = 3;
repeated int32 celt_versions = 4;
optional bool opus = 5 [default = false];
}

message Ping {
optional uint64 timestamp = 1;
optional uint32 good = 2;
optional uint32 late = 3;
optional uint32 lost = 4;
optional uint32 resync = 5;
optional uint32 udp_packets = 6;
optional uint32 tcp_packets = 7;
optional float udp_ping_avg = 8;
optional float udp_ping_var = 9;
optional float tcp_ping_avg = 10;
optional float tcp_ping_var = 11;
}

message Reject {
enum RejectType {
None = 0;
WrongVersion = 1;
InvalidUsername = 2;
WrongUserPW = 3;
WrongServerPW = 4;
UsernameInUse = 5;
ServerFull = 6;
NoCertificate = 7;
AuthenticatorFail = 8;
}
optional RejectType type = 1;
optional string reason = 2;
}

message ServerConfig {
optional uint32 max_bandwidth = 1;
optional string welcome_text = 2;
optional bool allow_html = 3;
optional uint32 message_length = 4;
optional uint32 image_message_length = 5;
}

message ServerSync {
optional uint32 session = 1;
optional uint32 max_bandwidth = 2;
optional string welcome_text = 3;
optional uint64 permissions = 4;
}

message ChannelRemove {
required uint32 channel_id = 1;
}

message ChannelState {
optional uint32 channel_id = 1;
optional uint32 parent = 2;
optional string name = 3;
repeated uint32 links = 4;
optional string description = 5;
repeated uint32 links_add = 6;
repeated uint32 links_remove = 7;
optional bool temporary = 8 [default = false];
optional int32 position = 9 [default = 0];
optional bytes description_hash = 10;
}

message UserRemove {
required uint32 session = 1;
optional uint32 actor = 2;
optional string reason = 3;
optional bool ban = 4;
}

message UserState {
optional uint32 session = 1;
optional uint32 actor = 2;
optional string name = 3;
optional uint32 user_id = 4;
optional uint32 channel_id = 5;
optional bool mute = 6;
optional bool deaf = 7;
optional bool suppress = 8;
optional bool self_mute = 9;
optional bool self_deaf = 10;
optional bytes texture = 11;
optional bytes plugin_context = 12;
optional string plugin_identity = 13;
optional string comment = 14;
optional string hash = 15;
optional bytes comment_hash = 16;
optional bytes texture_hash = 17;
optional bool priority_speaker = 18;
optional bool recording = 19;
}

message BanList {
message BanEntry {
required bytes address = 1;
required uint32 mask = 2;
optional string name = 3;
optional string hash = 4;
optional string reason = 5;
optional string start = 6;
optional uint32 duration = 7;
}
repeated BanEntry bans = 1;
optional bool query = 2 [default = false];
}

message TextMessage {
optional uint32 actor = 1;
repeated uint32 session = 2;
repeated uint32 channel_id = 3;
repeated uint32 tree_id = 4;
required string message = 5;
}

message PermissionDenied {
enum DenyType {
Text = 0;
Permission = 1;
SuperUser = 2;
ChannelName = 3;
TextTooLong = 4;
H9K = 5;
TemporaryChannel = 6;
MissingCertificate = 7;
UserName = 8;
ChannelFull = 9;
NestingLimit = 10;
}
optional uint32 permission = 1;
optional uint32 channel_id = 2;
optional uint32 session = 3;
optional string reason = 4;
optional DenyType type = 5;
optional string name = 6;
}

message ACL {
message ChanGroup {
required string name = 1;
optional bool inherited = 2 [default = true];
optional bool inherit = 3 [default = true];
optional bool inheritable = 4 [default = true];
repeated uint32 add = 5;
repeated uint32 remove = 6;
repeated uint32 inherited_members = 7;
}
message ChanACL {
optional bool apply_here = 1 [default = true];
optional bool apply_subs = 2 [default = true];
optional bool inherited = 3 [default = true];
optional uint32 user_id = 4;
optional string group = 5;
optional uint32 grant = 6;
optional uint32 deny = 7;
}
required uint32 channel_id = 1;
optional bool inherit_acls = 2 [default = true];
repeated ChanGroup groups = 3;
repeated ChanACL acls = 4;
optional bool query = 5 [default = false];
}

message QueryUsers {
repeated uint32 ids = 1;
repeated string names = 2;
}

message CryptSetup {
optional bytes key = 1;
optional bytes client_nonce = 2;
optional bytes server_nonce = 3;
}

message ContextActionModify {
enum Context {
Server = 0x01;
Channel = 0x02;
User = 0x04;
}
enum Operation {
Add = 0;
Remove = 1;
}
required string action = 1;
optional string text = 2;
optional uint32 context = 3;
optional Operation operation = 4;
}

message ContextAction {
optional uint32 session = 1;
optional uint32 channel_id = 2;
required string action = 3;
}

message UserList {
message User {
required uint32 user_id = 1;
optional string name = 2;
}
repeated User users = 1;
}

message VoiceTarget {
message Target {
repeated uint32 session = 1;
optional uint32 channel_id = 2;
optional string group = 3;
optional bool links = 4 [default = false];
optional bool children = 5 [default = false];
}
optional uint32 id = 1;
repeated Target targets = 2;
}

message PermissionQuery {
optional uint32 channel_id = 1;
optional uint32 permissions = 2;
optional bool flush = 3 [default = false];
}

message CodecVersion {
required int32 alpha = 1;
required int32 beta = 2;
required bool prefer_alpha = 3 [default = true];
optional bool opus = 4 [default = false];
}

message UserStats {
message Stats {
optional uint32 good = 1;
optional uint32 late = 2;
optional uint32 lost = 3;
optional uint32 resync = 4;
}

optional uint32 session = 1;
optional bool stats_only = 2 [default = false];
repeated bytes certificates = 3;
optional Stats from_client = 4;
optional Stats from_server = 5;

optional uint32 udp_packets = 6;
optional uint32 tcp_packets = 7;
optional float udp_ping_avg = 8;
optional float udp_ping_var = 9;
optional float tcp_ping_avg = 10;
optional float tcp_ping_var = 11;

optional Version version = 12;
repeated int32 celt_versions = 13;
optional bytes address = 14;
optional uint32 bandwidth = 15;
optional uint32 onlinesecs = 16;
optional uint32 idlesecs = 17;
optional bool strong_certificate = 18 [default = false];
optional bool opus = 19 [default = false];
}

message SuggestConfig {
optional uint32 version = 1;
optional bool positional = 2;
optional bool push_to_talk = 3;
}

message RequestBlob {
repeated uint32 session_texture = 1;
repeated uint32 session_comment = 2;
repeated uint32 channel_description = 3;
}

+ 12
- 0
Jumble/src/main/AndroidManifest.xml View File

@@ -0,0 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.morlunk.jumble"
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17" />

<application android:allowBackup="true">
<service android:name=".JumbleService"/>
</application>

</manifest>

+ 26
- 0
Jumble/src/main/aidl/com/morlunk/jumble/IJumbleObserver.aidl View File

@@ -0,0 +1,26 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble;

import com.morlunk.jumble.model.Channel;

interface IJumbleObserver {

//void onChannelAdded(out Channel channel);
//void onChannelStateUpdated(out Channel channel);
//void onChannelRemoved(out Channel channel);
}

+ 32
- 0
Jumble/src/main/aidl/com/morlunk/jumble/IJumbleService.aidl View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble;

import com.morlunk.jumble.JumbleParams;
import com.morlunk.jumble.model.User;
import com.morlunk.jumble.model.Channel;

interface IJumbleService {

/** Connects to a server using the passed parameters. */
void connect(in JumbleParams params);

User getUserWithId(int id);
Channel getChannelWithId(int id);

//List<Channel> getChannelList();
}

+ 19
- 0
Jumble/src/main/aidl/com/morlunk/jumble/JumbleParams.aidl View File

@@ -0,0 +1,19 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble;

parcelable JumbleParams;

+ 19
- 0
Jumble/src/main/aidl/com/morlunk/jumble/model/Channel.aidl View File

@@ -0,0 +1,19 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble.model;

parcelable Channel;

+ 19
- 0
Jumble/src/main/aidl/com/morlunk/jumble/model/Server.aidl View File

@@ -0,0 +1,19 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble.model;

parcelable Server;

+ 19
- 0
Jumble/src/main/aidl/com/morlunk/jumble/model/User.aidl View File

@@ -0,0 +1,19 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble.model;

parcelable User;

+ 23
- 0
Jumble/src/main/java/com/morlunk/jumble/Constants.java View File

@@ -0,0 +1,23 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble;

public class Constants {

public static final String TAG = "Jumble";

}

+ 94
- 0
Jumble/src/main/java/com/morlunk/jumble/JumbleParams.java View File

@@ -0,0 +1,94 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble;

import android.os.Parcel;
import android.os.Parcelable;
import com.morlunk.jumble.model.Server;

/**
* Parameters for connection to a Mumble server through the Jumble service.
*/
public class JumbleParams implements Parcelable {

// Connection
public Server server;

// General
public boolean showChatNotifications = true;
public boolean autoReconnect = true;

// Authentication
public String certificatePath;
public String certificatePassword;

// Audio
public int detectionThreshold = 1400;
public boolean usePushToTalk = false;
public boolean useOpus = true;

// Network
public boolean forceTcp = false;

public static final Parcelable.Creator<JumbleParams> CREATOR = new Parcelable.Creator<JumbleParams>() {

@Override
public JumbleParams createFromParcel(Parcel parcel) {
return new JumbleParams(parcel);
}

@Override
public JumbleParams[] newArray(int i) {
return new JumbleParams[i];
}
};

private JumbleParams(Parcel in) {
readFromParcel(in);
}

@Override
public void writeToParcel(Parcel out, int flags) {
out.writeParcelable(server, 0);
out.writeValue(showChatNotifications);
out.writeValue(autoReconnect);
out.writeString(certificatePath);
out.writeString(certificatePassword);
out.writeInt(detectionThreshold);
out.writeValue(usePushToTalk);
out.writeValue(useOpus);
out.writeValue(forceTcp);
}

public void readFromParcel(Parcel in) {
server = in.readParcelable(Server.class.getClassLoader());
showChatNotifications = (Boolean)in.readValue(Boolean.class.getClassLoader());
autoReconnect = (Boolean)in.readValue(Boolean.class.getClassLoader());
certificatePath = in.readString();
certificatePassword = in.readString();
detectionThreshold = in.readInt();
usePushToTalk = (Boolean)in.readValue(Boolean.class.getClassLoader());
useOpus = (Boolean)in.readValue(Boolean.class.getClassLoader());
forceTcp = (Boolean)in.readValue(Boolean.class.getClassLoader());
}

@Override
public int describeContents() {
return 0;
}

}

+ 55
- 0
Jumble/src/main/java/com/morlunk/jumble/JumbleService.java View File

@@ -0,0 +1,55 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import com.morlunk.jumble.model.Channel;
import com.morlunk.jumble.model.ChannelManager;
import com.morlunk.jumble.model.User;

import java.util.List;

public class JumbleService extends Service {

private JumbleParams mParams;
private ChannelManager mChannelManager;

private IJumbleService.Stub mBinder = new IJumbleService.Stub() {

@Override
public void connect(JumbleParams params) throws RemoteException {
mParams = params;
}

@Override
public User getUserWithId(int id) throws RemoteException {
return null;
}

@Override
public Channel getChannelWithId(int id) throws RemoteException {
return null;
}
};

public IBinder onBind(Intent intent) {
return mBinder;
}
}

+ 93
- 0
Jumble/src/main/java/com/morlunk/jumble/model/Channel.java View File

@@ -0,0 +1,93 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public final class Channel implements Parcelable {
private int mId;
private int mPosition;
private boolean mTemporary;
private Channel mParent;
private String mName;
private String mDescription;
private byte[] mDescriptionHash;
private List<Channel> mSubchannels;
private List<User> mUsers;

public static final Parcelable.Creator<Channel> CREATOR = new Parcelable.Creator<Channel>() {

@Override
public Channel createFromParcel(Parcel parcel) {
return new Channel(parcel);
}

@Override
public Channel[] newArray(int i) {
return new Channel[i];
}
};

public Channel(int id, String name, Channel parent) {
mId = id;
mName = name;
if(parent != null) {
mParent = parent;

}
}

private Channel(Parcel in) {
readFromParcel(in);
}

@Override
public void writeToParcel(Parcel out, int flags) {
out.writeInt(mId);
out.writeInt(mPosition);
out.writeValue(mTemporary);
out.writeParcelable(mParent, 0);
out.writeString(mName);
out.writeString(mDescription);
out.writeInt(mDescriptionHash.length); // Store length so we can re-initialize byte buffer on read
out.writeByteArray(mDescriptionHash);
out.writeList(mSubchannels);
out.writeList(mUsers);
}

public void readFromParcel(Parcel in) {
mId = in.readInt();
mPosition = in.readInt();
mTemporary = (Boolean)in.readValue(Boolean.class.getClassLoader());
mParent = in.readParcelable(Channel.class.getClassLoader());
mName = in.readString();
mDescription = in.readString();
int descriptionHashLength = in.readInt();
mDescriptionHash = new byte[descriptionHashLength];
in.readByteArray(mDescriptionHash);
mSubchannels = in.readArrayList(Channel.class.getClassLoader());
mUsers = in.readArrayList(User.class.getClassLoader());
}

@Override
public int describeContents() {
return 0;
}
}

+ 32
- 0
Jumble/src/main/java/com/morlunk/jumble/model/ChannelManager.java View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble.model;

import android.util.SparseArray;

public class ChannelManager {

private SparseArray<Channel> mChannels;

public ChannelManager() {
mChannels = new SparseArray<Channel>();
}

public Channel getChannel(int id) {
return mChannels.get(id);
}
}

+ 63
- 0
Jumble/src/main/java/com/morlunk/jumble/model/Server.java View File

@@ -0,0 +1,63 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble.model;

import android.os.Parcel;
import android.os.Parcelable;

public class Server implements Parcelable {

private String mName;
private String mHost;
private int mPort;
private String mUsername;
private String mPassword;

public static final Parcelable.Creator<Server> CREATOR = new Parcelable.Creator<Server>() {

@Override
public Server createFromParcel(Parcel parcel) {
return new Server(parcel);
}

@Override
public Server[] newArray(int i) {
return new Server[i];
}
};

public Server() {

}

private Server(Parcel in) {
readFromParcel(in);
}

@Override
public void writeToParcel(Parcel parcel, int i) {

}

public void readFromParcel(Parcel in) {
}

@Override
public int describeContents() {
return 0;
}
}

+ 76
- 0
Jumble/src/main/java/com/morlunk/jumble/model/User.java View File

@@ -0,0 +1,76 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble.model;

import android.os.Parcel;
import android.os.Parcelable;

public class User implements Parcelable {

private int mSession;
private int mId;
private String mName;
private String mComment;
private byte[] mCommentHash;
private String mHash;

private boolean mMuted;
private boolean mDeafened;
private boolean mSuppressed;

private boolean mSelfMuted;
private boolean mSelfDeafened;

private boolean mPrioritySpeaker;
private boolean mRecording;

private Channel mChannel;

public static final Parcelable.Creator<User> CREATOR = new Parcelable.Creator<User>() {

@Override
public User createFromParcel(Parcel parcel) {
return new User(parcel);
}

@Override
public User[] newArray(int i) {
return new User[i];
}
};

public User() {

}

private User(Parcel in) {
readFromParcel(in);
}

@Override
public void writeToParcel(Parcel parcel, int i) {

}

public void readFromParcel(Parcel in) {
}

@Override
public int describeContents() {
return 0;
}
}

+ 66
- 0
Jumble/src/main/java/com/morlunk/jumble/net/JumbleConnection.java View File

@@ -0,0 +1,66 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble.net;

import com.google.protobuf.Message;
import com.morlunk.jumble.model.Server;

import javax.net.ssl.SSLSocket;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.Socket;

public class JumbleConnection {

public interface JumbleConnectionListener {
public void onConnect();
public void onDisconnect();
}

private Server mServer;

private SSLSocket mTCPSocket;
private DatagramSocket mUDPSocket;

public JumbleConnection() {

}

public void connect(Server server) {
mServer = server;

}

public void disconnect() {
try {
mTCPSocket.close();
} catch (IOException e) {
e.printStackTrace();
}
mUDPSocket.close();

mServer = null;
}

public void sendMessage(Message message) throws IOException {
byte[] messageBytes = message.toByteArray();
DatagramPacket packet = new DatagramPacket(messageBytes, messageBytes.length);
mUDPSocket.send(packet);
}

}

+ 85
- 0
Jumble/src/main/java/com/morlunk/jumble/net/JumbleSSLSocketFactory.java View File

@@ -0,0 +1,85 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.morlunk.jumble.net;

import java.io.IOException;
import java.net.Socket;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.SecureRandom;
import java.security.UnrecoverableKeyException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;

import org.apache.http.conn.ssl.SSLSocketFactory;

public class JumbleSSLSocketFactory extends SSLSocketFactory {

private SSLContext sslContext = SSLContext.getInstance(TLS);

public JumbleSSLSocketFactory(KeyStore keystore, String keystorePassword, KeyStore truststore) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException,
UnrecoverableKeyException, NoSuchProviderException {
super(keystore, keystorePassword, truststore);

TrustManager trustManager = new X509TrustManager() {
@Override
public X509Certificate[] getAcceptedIssuers() {
return null;
}

@Override
public void checkServerTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
}

@Override
public void checkClientTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
}
};

KeyManager[] keyManagers = null;

if(keystore != null) {
KeyManagerFactory factory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
factory.init(keystore, keystorePassword.toCharArray());
keyManagers = factory.getKeyManagers();
}

sslContext.init(keyManagers, new TrustManager[] { trustManager }, new SecureRandom());
}

@Override
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException {
return sslContext.getSocketFactory().createSocket(socket, host, port, autoClose);
}

@Override
public Socket createSocket() throws IOException {
return sslContext.getSocketFactory().createSocket();
}

}

+ 29867
- 0
Jumble/src/main/java/com/morlunk/jumble/protobuf/Mumble.java
File diff suppressed because it is too large
View File


+ 2
- 0
Jumble/src/main/res/values/strings.xml View File

@@ -0,0 +1,2 @@
<resources>
</resources>

+ 20
- 0
Jumble/src/main/res/values/styles.xml View File

@@ -0,0 +1,20 @@
<resources>

<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>

</resources>

+ 202
- 0
LICENSE View File

@@ -0,0 +1,202 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

+ 1
- 0
build.gradle View File

@@ -0,0 +1 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

BIN
gradle/wrapper/gradle-wrapper.jar View File


+ 22
- 0
gradle/wrapper/gradle-wrapper.properties View File

@@ -0,0 +1,22 @@
#
# Copyright (C) 2013 Andrew Comminos
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip

+ 164
- 0
gradlew View File

@@ -0,0 +1,164 @@
#!/usr/bin/env bash

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
echo "$*"
}

die ( ) {
echo
echo "$*"
echo
exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option

if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

+ 90
- 0
gradlew.bat View File

@@ -0,0 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

+ 17
- 0
settings.gradle View File

@@ -0,0 +1,17 @@
/*
* Copyright (C) 2013 Andrew Comminos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

include ':Jumble'

Loading…
Cancel
Save