diff --git a/build.gradle b/build.gradle
index d36af71b..d4d261f3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -25,7 +25,6 @@ subprojects { Project subproject ->
}
dependencies {
classpath dependency.androidGradlePlugin
- classpath 'io.fabric.gradle.unity:unity:0.0.1'
}
}
diff --git a/settings.gradle b/settings.gradle
index 3da05967..6f478b12 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -20,5 +20,4 @@ include ':tweet-composer'
include ':tweet-ui'
include ':twitter-mopub'
include ':twitter'
-include ':twitter-unity'
include ':samples:app'
\ No newline at end of file
diff --git a/twitter-unity/build.gradle b/twitter-unity/build.gradle
deleted file mode 100644
index dce9d132..00000000
--- a/twitter-unity/build.gradle
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2015 Twitter, Inc.
- *
- * 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.
- *
- */
-
-apply plugin: 'com.android.library'
-apply plugin: 'io.fabric.gradle.unity'
-
-android {
- compileSdkVersion rootProject.compileSdkVersion
- buildToolsVersion rootProject.buildToolsVersion
-
- defaultConfig {
- versionCode 1
- versionName version
- minSdkVersion rootProject.minSdkVersion
- consumerProguardFiles 'proguard.txt'
- }
-
- buildTypes {
- debug {
- buildConfigField "String", "GROUP", "\"${pom_group_id}\""
- buildConfigField "String", "ARTIFACT_ID", "\"${pom_artifact_id}\""
- buildConfigField "String", "BUILD_NUMBER", "\"${buildNumber}\""
- buildConfigField "long", "BUILD_TIME", "${System.currentTimeMillis()}L"
-
- testCoverageEnabled enableTestCodeCoverage
- }
- release {
- buildConfigField "String", "GROUP", "\"${pom_group_id}\""
- buildConfigField "String", "ARTIFACT_ID", "\"${pom_artifact_id}\""
- buildConfigField "String", "BUILD_NUMBER", "\"${buildNumber}\""
- buildConfigField "long", "BUILD_TIME", "${System.currentTimeMillis()}L"
- }
- }
-
- lintOptions {
- warningsAsErrors true
- }
-
- compileOptions {
- sourceCompatibility rootProject.sourceCompatibilityVersion
- targetCompatibility rootProject.targetCompatibilityVersion
- }
-
- // Forcibly add debug and the generated "R" files onto the test classpath
- sourceSets {
- test.java.srcDirs += "build/generated/source/r/debug"
- test.java.srcDirs += "src/debug"
- }
-
- testOptions {
- unitTests.returnDefaultValues = true
- }
-}
-
-dependencies {
- provided fileTree(dir: 'libs', include: ['unity.jar'])
- compile project(':twitter-core')
- compile project(':tweet-composer')
-}
\ No newline at end of file
diff --git a/twitter-unity/changelog.md b/twitter-unity/changelog.md
deleted file mode 100644
index 62fb6062..00000000
--- a/twitter-unity/changelog.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Twitter Unity Android SDK changelog
-*Non-trivial pull requests should include an entry below. Entries must be suitable for inclusion in public-facing materials such as release notes and blog posts. Keep them short, sweet, and in the past tense. New entries go on top. When merging to deploy, add the version number and date.*
-
-## Unreleased
-
-## v3.0.0
-
-## v0.1.0
-
-* Added support for "Login with Twitter".
-* Added support for request email.
-* Added support for composer with app install card.
diff --git a/twitter-unity/gradle.properties b/twitter-unity/gradle.properties
deleted file mode 100644
index 2b81e2aa..00000000
--- a/twitter-unity/gradle.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (C) 2015 Twitter, Inc.
-#
-# 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.
-#
-#
-
-# The to be released version. When releasing, drop -SNAPSHOT. After releasing, bump version
-# number and add back -SNAPSHOT
-version=3.0.1-SNAPSHOT
-version_code=1
-
-pom_name=Twitter Unity Android SDK
-pom_group_id=com.twitter.sdk.android
-pom_artifact_id=twitter-unity
-pom_packaging=aar
diff --git a/twitter-unity/internal-build.gradle b/twitter-unity/internal-build.gradle
deleted file mode 100644
index 6d9b80c8..00000000
--- a/twitter-unity/internal-build.gradle
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2015 Twitter, Inc.
- *
- * 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.
- *
- */
-
-apply plugin: 'com.android.library'
-apply from: rootProject.qualityScript
-apply plugin: 'io.fabric.gradle.unity'
-apply plugin: io.fabric.gradle.weaving.ArtifactSizePlugin
-apply plugin: io.fabric.gradle.weaving.DexMethodCountPlugin
-
-android {
- compileSdkVersion rootProject.compileSdkVersion
- buildToolsVersion rootProject.buildToolsVersion
-
- defaultConfig {
- versionCode 1
- versionName version
- group pom_group_id
-
- minSdkVersion rootProject.minSdkVersion
- consumerProguardFiles 'proguard.txt'
- }
-
- buildTypes {
- debug {
- buildConfigField "String", "GROUP", "\"${pom_group_id}\""
- buildConfigField "String", "ARTIFACT_ID", "\"${pom_artifact_id}\""
- buildConfigField "String", "BUILD_NUMBER", "\"${buildNumber}\""
- buildConfigField "long", "BUILD_TIME", "${System.currentTimeMillis()}L"
-
- testCoverageEnabled enableTestCodeCoverage
- }
- release {
- buildConfigField "String", "GROUP", "\"${pom_group_id}\""
- buildConfigField "String", "ARTIFACT_ID", "\"${pom_artifact_id}\""
- buildConfigField "String", "BUILD_NUMBER", "\"${buildNumber}\""
- buildConfigField "long", "BUILD_TIME", "${System.currentTimeMillis()}L"
- }
- }
-
- lintOptions {
- warningsAsErrors true
- }
-
- dexMethodCount {
- packageFilter = "com.twitter.sdk.android.unity"
- }
-
- //Gradle publishes only release by default for multi module projects
- //This will publish all build variants and we can specifically choose them
- defaultPublishConfig 'release'
- publishNonDefault true
-
- compileOptions {
- sourceCompatibility rootProject.sourceCompatibilityVersion
- targetCompatibility rootProject.targetCompatibilityVersion
- }
-
- testOptions {
- unitTests.returnDefaultValues = true
- }
-}
-
-ext.projectDependencies = [
- ':sdk:twitter:twitter-core' : 'com.twitter.sdk.android:twitter-core:+@aar',
- ':sdk:twitter:tweet-composer' : 'com.twitter.sdk.android:tweet-composer:+@aar'
-]
-
-dependencies {
- provided fileTree(dir: 'libs', include: ['unity.jar'])
- projectDependencies.each { path, binary ->
- debugCompile project(path: path, configuration: 'debug')
- releaseCompile projectOrBinary(path: path, configuration: 'release', binary: binary)
- }
-}
-
-apply from: rootProject.deployScript
\ No newline at end of file
diff --git a/twitter-unity/libs/unity.jar b/twitter-unity/libs/unity.jar
deleted file mode 100644
index 8e4b58d4..00000000
Binary files a/twitter-unity/libs/unity.jar and /dev/null differ
diff --git a/twitter-unity/lint.xml b/twitter-unity/lint.xml
deleted file mode 100644
index e7e65f76..00000000
--- a/twitter-unity/lint.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/twitter-unity/proguard.txt b/twitter-unity/proguard.txt
deleted file mode 100644
index 8134e628..00000000
--- a/twitter-unity/proguard.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-# Proguard config for JNI helper
--keep class com.twitter.sdk.android.unity.TwitterKit { *; }
diff --git a/twitter-unity/src/main/AndroidManifest.xml b/twitter-unity/src/main/AndroidManifest.xml
deleted file mode 100644
index 93eb5548..00000000
--- a/twitter-unity/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/twitter-unity/src/main/java/com/twitter/sdk/android/core/TwitterSessionHelper.java b/twitter-unity/src/main/java/com/twitter/sdk/android/core/TwitterSessionHelper.java
deleted file mode 100644
index 0a916f48..00000000
--- a/twitter-unity/src/main/java/com/twitter/sdk/android/core/TwitterSessionHelper.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2015 Twitter, Inc.
- *
- * 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.twitter.sdk.android.core;
-
-/**
- * Helper for serializing/deserializing TwitterSession class
- */
-public class TwitterSessionHelper {
- public static String serialize(TwitterSession session) {
- final TwitterSession.Serializer serializer = new TwitterSession.Serializer();
- return serializer.serialize(session);
- }
-
- public static TwitterSession deserialize(String session) {
- final TwitterSession.Serializer serializer = new TwitterSession.Serializer();
- return serializer.deserialize(session);
- }
-}
diff --git a/twitter-unity/src/main/java/com/twitter/sdk/android/unity/ApiError.java b/twitter-unity/src/main/java/com/twitter/sdk/android/unity/ApiError.java
deleted file mode 100644
index 0c923520..00000000
--- a/twitter-unity/src/main/java/com/twitter/sdk/android/unity/ApiError.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2015 Twitter, Inc.
- *
- * 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.twitter.sdk.android.unity;
-
-import android.text.TextUtils;
-
-import com.google.gson.Gson;
-import com.twitter.sdk.android.core.Twitter;
-import com.twitter.sdk.android.core.TwitterCore;
-import com.twitter.sdk.android.core.internal.persistence.SerializationStrategy;
-
-class ApiError {
- public final int code;
- public final String message;
-
- ApiError(int code, String message) {
- this.code = code;
- this.message = message;
- }
-
- static class Serializer implements SerializationStrategy {
-
- private final Gson gson;
-
- public Serializer() {
- this.gson = new Gson();
- }
-
- @Override
- public String serialize(ApiError error) {
- try {
- return gson.toJson(error);
- } catch (Exception e) {
- Twitter.getLogger().d(TwitterCore.TAG, e.getMessage());
- }
- return "";
- }
-
- @Override
- public ApiError deserialize(String serializedSession) {
- if (!TextUtils.isEmpty(serializedSession)) {
- try {
- return gson.fromJson(serializedSession, ApiError.class);
- } catch (Exception e) {
- Twitter.getLogger().d(TwitterCore.TAG, e.getMessage());
- }
- }
- return null;
- }
- }
-}
diff --git a/twitter-unity/src/main/java/com/twitter/sdk/android/unity/LoginActivity.java b/twitter-unity/src/main/java/com/twitter/sdk/android/unity/LoginActivity.java
deleted file mode 100644
index 90fcf906..00000000
--- a/twitter-unity/src/main/java/com/twitter/sdk/android/unity/LoginActivity.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2015 Twitter, Inc.
- *
- * 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.twitter.sdk.android.unity;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Bundle;
-
-import com.twitter.sdk.android.core.Callback;
-import com.twitter.sdk.android.core.Result;
-import com.twitter.sdk.android.core.TwitterException;
-import com.twitter.sdk.android.core.TwitterSession;
-import com.twitter.sdk.android.core.TwitterSessionHelper;
-import com.twitter.sdk.android.core.identity.TwitterAuthClient;
-
-/**
- * Activity used to launch Twitter login, receive the result, and publish result to Unity.
- */
-public class LoginActivity extends Activity {
- TwitterAuthClient authClient;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- authClient = new TwitterAuthClient();
- authClient.authorize(this, new Callback() {
- @Override
- public void success(Result result) {
- final String session = TwitterSessionHelper.serialize(result.data);
- final UnityMessage message = new UnityMessage.Builder()
- .setMethod("LoginComplete")
- .setData(session)
- .build();
- message.send();
- finish();
- }
-
- @Override
- public void failure(TwitterException ex) {
- final String error = new ApiError.Serializer()
- .serialize(new ApiError(0, ex.getMessage()));
- final UnityMessage message = new UnityMessage.Builder()
- .setMethod("LoginFailed")
- .setData(error)
- .build();
- message.send();
- finish();
- }
- });
- }
-
- @Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
-
- authClient.onActivityResult(requestCode, resultCode, data);
- }
-}
diff --git a/twitter-unity/src/main/java/com/twitter/sdk/android/unity/TwitterKit.java b/twitter-unity/src/main/java/com/twitter/sdk/android/unity/TwitterKit.java
deleted file mode 100644
index 2d830c12..00000000
--- a/twitter-unity/src/main/java/com/twitter/sdk/android/unity/TwitterKit.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2015 Twitter, Inc.
- *
- * 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.twitter.sdk.android.unity;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.net.Uri;
-
-import com.twitter.sdk.android.core.Callback;
-import com.twitter.sdk.android.core.Result;
-import com.twitter.sdk.android.core.Twitter;
-import com.twitter.sdk.android.core.TwitterAuthConfig;
-import com.twitter.sdk.android.core.TwitterConfig;
-import com.twitter.sdk.android.core.TwitterCore;
-import com.twitter.sdk.android.core.TwitterException;
-import com.twitter.sdk.android.core.TwitterSession;
-import com.twitter.sdk.android.core.TwitterSessionHelper;
-import com.twitter.sdk.android.core.identity.TwitterAuthClient;
-import com.twitter.sdk.android.tweetcomposer.ComposerActivity;
-import com.unity3d.player.UnityPlayer;
-
-/**
- * A class to expose TwitterKit methods for Unity
- */
-public class TwitterKit {
- public static final String GAME_OBJECT_NAME = "TwitterGameObject";
-
- /**
- * Initializes TwitterKit, must be called before {@link #login}
- * @param consumerKey Twitter App Consumer Key (API Key)
- * @param consumerSecret Twitter App Consumer Secret (API Secret)
- */
- public static void init(final String consumerKey, final String consumerSecret) {
- final TwitterConfig config = new TwitterConfig.Builder(
- UnityPlayer.currentActivity.getApplicationContext())
- .twitterAuthConfig(new TwitterAuthConfig(consumerKey, consumerSecret))
- .build();
- Twitter.initialize(config);
- }
-
- /**
- * Convenience method for launching Twitter login using JNI.
- */
- public static void login() {
- final Activity currentActivity = UnityPlayer.currentActivity;
- final Intent intent = new Intent(currentActivity, LoginActivity.class);
- currentActivity.startActivity(intent);
- }
-
- /**
- * Convenience method for logging out active user using JNI.
- */
- public static void logout() {
- TwitterCore.getInstance().getSessionManager().clearActiveSession();
- }
-
- /**
- * Convenience method for retrieving active user using JNI.
- */
- public static String session() {
- final TwitterSession session = TwitterCore.getInstance().getSessionManager()
- .getActiveSession();
- return TwitterSessionHelper.serialize(session);
- }
-
- /**
- * Convenience method for starting Tweet composer with app card preview.
- *
- * @param session the user session
- * @param imageUri URI of the image
- * @param text the text to be included in the tweet
- * @param hashtags the hashtags to be included in the tweet
- */
- public static void compose(String session, String imageUri, String text, String[] hashtags) {
- final Activity currentActivity = UnityPlayer.currentActivity;
-
- final Intent intent = new ComposerActivity.Builder(currentActivity)
- .session(TwitterSessionHelper.deserialize(session))
- .image(imageUri != null ? Uri.parse(imageUri) : null)
- .text(text)
- .hashtags(hashtags)
- .createIntent();
- currentActivity.startActivity(intent);
- }
-
- /**
- * Convenience method for requesting users email address using JNI.
- *
- * @param session the user session
- */
- public static void requestEmail(String session) {
- final TwitterSession twitterSession = TwitterSessionHelper.deserialize(session);
- new TwitterAuthClient().requestEmail(twitterSession, new Callback() {
- @Override
- public void success(Result result) {
- final UnityMessage message = new UnityMessage.Builder()
- .setMethod("RequestEmailComplete")
- .setData(result.data)
- .build();
- message.send();
- }
-
- @Override
- public void failure(TwitterException exception) {
- final String error = new ApiError.Serializer()
- .serialize(new ApiError(0, exception.getMessage()));
- final UnityMessage message = new UnityMessage.Builder()
- .setMethod("RequestEmailFailed")
- .setData(error)
- .build();
- message.send();
- }
- });
- }
-}
diff --git a/twitter-unity/src/main/java/com/twitter/sdk/android/unity/UnityMessage.java b/twitter-unity/src/main/java/com/twitter/sdk/android/unity/UnityMessage.java
deleted file mode 100644
index a022903d..00000000
--- a/twitter-unity/src/main/java/com/twitter/sdk/android/unity/UnityMessage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2015 Twitter, Inc.
- *
- * 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.twitter.sdk.android.unity;
-
-import com.unity3d.player.UnityPlayer;
-
-class UnityMessage {
- final String data;
- final String method;
-
- UnityMessage(String method, String data) {
- this.method = method;
- this.data = data;
- }
-
- public static class Builder {
- String data = "";
- String method;
-
- public Builder setData(String data) {
- this.data = data;
- return this;
- }
-
- public Builder setMethod(String method) {
- this.method = method;
- return this;
- }
-
- public UnityMessage build() {
- return new UnityMessage(method, data);
- }
- }
-
- public void send() {
- UnityPlayer.UnitySendMessage(TwitterKit.GAME_OBJECT_NAME, method, data);
- }
-}