Skip to content

Commit

Permalink
Update Twitter Kit build
Browse files Browse the repository at this point in the history
Change-Id: Ib425ff05a0aa7839be87ab36da6f39e0577ef1a6
  • Loading branch information
Eric Frohnhoefer committed Nov 13, 2017
1 parent 05486ae commit 9a579de
Show file tree
Hide file tree
Showing 28 changed files with 121 additions and 173 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ subprojects { Project subproject ->
buildscript {
repositories {
jcenter()
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
Expand All @@ -29,6 +30,7 @@ subprojects { Project subproject ->
}

repositories {
google()
jcenter()
}
}
Expand Down
38 changes: 19 additions & 19 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
ext {
compileSdkVersion = 25
buildToolsVersion = '25.0.0'
compileSdkVersion = 26
buildToolsVersion = '26.0.2'
targetSdkVersion = 22
minSdkVersion = 14

sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
sourceCompatibilityVersion = JavaVersion.VERSION_1_8
targetCompatibilityVersion = JavaVersion.VERSION_1_8

enableTestCodeCoverage = true
buildNumber = 'dev'

dependency = [
// Gradle plugins
spoonGradlePlugin : 'com.stanfy.spoon:spoon-gradle-plugin:1.0.4',
androidGradlePlugin : 'com.android.tools.build:gradle:2.3.1',
androidGradlePlugin : 'com.android.tools.build:gradle:3.0.0',

// Mopub
mopub : 'com.mopub:mopub-sdk:4.11.0@aar',

// Sample App
leakCanary : 'com.squareup.leakcanary:leakcanary-android:1.4',
leakCanaryNoOp : 'com.squareup.leakcanary:leakcanary-android-no-op:1.4',
appCompat : 'com.android.support:appcompat-v7:23.1.1',
leakCanary : 'com.squareup.leakcanary:leakcanary-android:1.5.3',
leakCanaryNoOp : 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.3',
appCompat : 'com.android.support:appcompat-v7:26.1.0',

// Tests
spoon : 'com.squareup.spoon:spoon-client:1.3.2',
espresso : 'com.android.support.test.espresso:espresso-core:2.2.2',
androidTestingSupport : 'com.android.support.test:runner:0.5',
espresso : 'com.android.support.test.espresso:espresso-core:3.0.1',
androidTestingSupport : 'com.android.support.test:runner:1.0.1',
junit : 'junit:junit:4.12',
equalsVerifier : 'nl.jqno.equalsverifier:equalsverifier:2.2.1',
robolectric : 'org.robolectric:robolectric:3.2.2',
Expand All @@ -35,15 +35,15 @@ ext {

// Other
picasso : 'com.squareup.picasso:picasso:2.5.2',
supportV4 : 'com.android.support:support-v4:23.1.1',
retrofit : 'com.squareup.retrofit2:retrofit:2.1.0',
retrofitMock : 'com.squareup.retrofit2:retrofit-mock:2.1.0',
retrofitGsonConverter : 'com.squareup.retrofit2:converter-gson:2.1.0',
supportV4 : 'com.android.support:support-v4:26.1.0',
retrofit : 'com.squareup.retrofit2:retrofit:2.3.0',
retrofitMock : 'com.squareup.retrofit2:retrofit-mock:2.3.0',
retrofitGsonConverter : 'com.squareup.retrofit2:converter-gson:2.3.0',
gson : 'com.google.code.gson:gson:2.7',
okHttp : 'com.squareup.okhttp3:okhttp:3.4.2',
okHttpInterceptor : 'com.squareup.okhttp3:logging-interceptor:3.4.2',
design : 'com.android.support:design:23.1.1',
tweetText : 'com.twitter:twitter-text:1.14.3',
recyclerview : 'com.android.support:recyclerview-v7:23.1.1'
okHttp : 'com.squareup.okhttp3:okhttp:3.8.0',
okHttpInterceptor : 'com.squareup.okhttp3:logging-interceptor:3.8.0',
design : 'com.android.support:design:26.1.0',
tweetText : 'com.twitter:twitter-text:1.14.7',
recyclerview : 'com.android.support:recyclerview-v7:26.1.0'
]
}
10 changes: 5 additions & 5 deletions samples/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ android {
}

dependencies {
compile project(':twitter')
compile project(':twitter-mopub')
compile dependency.appCompat
compile dependency.design
compile dependency.okHttpInterceptor
implementation project(':twitter')
implementation project(':twitter-mopub')
implementation dependency.appCompat
implementation dependency.design
implementation dependency.okHttpInterceptor

debugCompile dependency.leakCanary
releaseCompile dependency.leakCanaryNoOp
Expand Down
16 changes: 7 additions & 9 deletions samples/app/internal-build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,14 @@ android {
}

dependencies {
debugCompile project(path: ':sdk:twitter:twitter', configuration: 'debug')
debugCompile project(path: ':sdk:twitter:twitter-mopub', configuration: 'debug')
releaseCompile project(path: ':sdk:twitter:twitter', configuration: 'release')
releaseCompile project(path: ':sdk:twitter:twitter-mopub', configuration: 'release')
implementation project(path: ':sdk:twitter:twitter')
implementation project(path: ':sdk:twitter:twitter-mopub')
implementation dependency.appCompat
implementation dependency.design
implementation dependency.okHttpInterceptor

compile dependency.appCompat
compile dependency.design
compile dependency.okHttpInterceptor
debugCompile dependency.leakCanary
releaseCompile dependency.leakCanaryNoOp
debugImplementation dependency.leakCanary
releaseImplementation dependency.leakCanaryNoOp

androidTestCompile dependency.spoon
androidTestCompile dependency.espresso
Expand Down
2 changes: 0 additions & 2 deletions samples/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@

<color name="twitter_blue">#ff55acee</color>
<color name="twitter_dark">#ff292f33</color>
<color name="solid_red">#ff0000</color>
<color name="solid_yellow">#fff000</color>
<color name="divider_gray">#ffe1e8ed</color>
</resources>
17 changes: 0 additions & 17 deletions samples/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@
<item name="colorAccent">@color/app_accent</item>
</style>

<!--Demos client styling with a style inheriting from our styles-->
<style name="twitter_InheritedLightTweet" parent="tw__TweetLightStyle">
<item name="tw__primary_text_color">@color/solid_red</item>
</style>

<!--Demos client styling a subset of custom attributes-->
<style name="twitter_IndependentTweetStyle">
<item name="tw__primary_text_color">@color/solid_yellow</item>
<item name="tw__action_color">@color/solid_red</item>
</style>

<style name="twitter_FillParent">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
Expand All @@ -36,12 +25,6 @@
<item name="android:layout_height">wrap_content</item>
</style>

<style name="twitter_Divider">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
<item name="android:background">?android:attr/listDivider</item>
</style>

<style name="twitter_Tab" parent="Widget.Design.TabLayout">
<item name="android:background">@color/twitter_blue</item>
<item name="tabIndicatorColor">@android:color/white</item>
Expand Down
7 changes: 4 additions & 3 deletions tweet-composer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ android {

testOptions {
unitTests.returnDefaultValues = true
unitTests.includeAndroidResources true
}
}

dependencies {
compile project(':twitter-core')
api project(':twitter-core')

compile dependency.picasso
compile dependency.tweetText
implementation dependency.picasso
implementation dependency.tweetText

androidTestCompile dependency.mockito
androidTestCompile dependency.dexmakerMockito
Expand Down
19 changes: 11 additions & 8 deletions tweet-composer/internal-build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import io.fabric.gradle.weaving.ArtifactSizePlugin
import io.fabric.gradle.weaving.DexMethodCountPlugin

/*
* Copyright (C) 2015 Twitter, Inc.
*
Expand All @@ -17,8 +20,8 @@

apply plugin: 'com.android.library'
apply from: rootProject.qualityScript
apply plugin: io.fabric.gradle.weaving.ArtifactSizePlugin
apply plugin: io.fabric.gradle.weaving.DexMethodCountPlugin
apply plugin: ArtifactSizePlugin
apply plugin: DexMethodCountPlugin

android {
compileSdkVersion rootProject.compileSdkVersion
Expand Down Expand Up @@ -69,20 +72,20 @@ android {

testOptions {
unitTests.returnDefaultValues = true
unitTests.includeAndroidResources true
}
}

ext.projectDependencies = [
':sdk:twitter:twitter-core' : 'com.twitter.sdk.android:twitter-core:+@aar'
':sdk:twitter:twitter-core'
]

dependencies {
projectDependencies.each { path, binary ->
debugCompile project(path: path, configuration: 'debug')
releaseCompile projectOrBinary(path: path, configuration: 'release', binary: binary)
projectDependencies.each { path ->
api project(path: path)
}
compile dependency.picasso
compile dependency.tweetText
implementation dependency.picasso
implementation dependency.tweetText

androidTestCompile dependency.mockito
androidTestCompile dependency.dexmakerMockito
Expand Down
35 changes: 0 additions & 35 deletions tweet-composer/src/main/res/values-v11/themes.xml

This file was deleted.

8 changes: 6 additions & 2 deletions tweet-composer/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@
-->

<resources>
<style name="ComposerLight" parent="@android:style/Theme.Light" >
<style name="ComposerLight" parent="@android:style/Theme.Holo.Light" >
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:textColor">@color/tw__composer_black</item>
<item name="android:textColorSecondary">@color/tw__composer_deep_gray</item>
<item name="android:textColorHint">@color/tw__composer_light_gray</item>
<item name="tw__twitter_logo">@drawable/tw__composer_logo_blue</item>
</style>
<style name="ComposerDark" parent="@android:style/Theme" >
<style name="ComposerDark" parent="@android:style/Theme.Holo" >
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:textColor">@color/tw__composer_white</item>
<item name="android:textColorSecondary">@color/tw__composer_deep_gray</item>
<item name="android:textColorHint">@color/tw__composer_light_gray</item>
Expand Down
9 changes: 5 additions & 4 deletions tweet-ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,16 @@ android {

testOptions {
unitTests.returnDefaultValues = true
unitTests.includeAndroidResources true
}
}

dependencies {
compile project(':twitter-core')
api project(':twitter-core')

compile dependency.picasso
compile dependency.supportV4
compile dependency.recyclerview
implementation dependency.picasso
implementation dependency.supportV4
implementation dependency.recyclerview

androidTestCompile dependency.retrofitMock
androidTestCompile dependency.mockito
Expand Down
21 changes: 12 additions & 9 deletions tweet-ui/internal-build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import io.fabric.gradle.weaving.ArtifactSizePlugin
import io.fabric.gradle.weaving.DexMethodCountPlugin

/*
* Copyright (C) 2015 Twitter, Inc.
*
Expand All @@ -17,8 +20,8 @@

apply plugin: 'com.android.library'
apply from: rootProject.qualityScript
apply plugin: io.fabric.gradle.weaving.ArtifactSizePlugin
apply plugin: io.fabric.gradle.weaving.DexMethodCountPlugin
apply plugin: ArtifactSizePlugin
apply plugin: DexMethodCountPlugin

android {
compileSdkVersion rootProject.compileSdkVersion
Expand Down Expand Up @@ -76,22 +79,22 @@ android {

testOptions {
unitTests.returnDefaultValues = true
unitTests.includeAndroidResources true
}
}

ext.projectDependencies = [
':sdk:twitter:twitter-core' : 'com.twitter.sdk.android:twitter-core:+@aar'
':sdk:twitter:twitter-core'
]

dependencies {
projectDependencies.each { path, binary ->
debugCompile project(path: path, configuration: 'debug')
releaseCompile projectOrBinary(path: path, configuration: 'release', binary: binary)
projectDependencies.each { path ->
api project(path: path)
}

compile dependency.picasso
compile dependency.supportV4
compile dependency.recyclerview
implementation dependency.picasso
implementation dependency.supportV4
implementation dependency.recyclerview

androidTestCompile dependency.retrofitMock
androidTestCompile dependency.mockito
Expand Down
1 change: 1 addition & 0 deletions tweet-ui/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@
<ignore path="src/main/java/com/twitter/sdk/android/tweetui/internal/VideoControlView.java"/>
</issue>
<issue id="InvalidPackage" severity="ignore"/>
<issue id="ClickableViewAccessibility" severity="ignore"/>
</lint>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package com.twitter.sdk.android.tweetui.internal;

import android.annotation.SuppressLint;
import android.text.Layout;
import android.text.Spanned;
import android.view.MotionEvent;
Expand All @@ -40,7 +39,6 @@ public class SpanClickHandler {
public static void enableClicksOnSpans(TextView textView) {
final SpanClickHandler helper = new SpanClickHandler(textView, null);
textView.setOnTouchListener(new View.OnTouchListener() {
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouch(View view, MotionEvent event) {
final TextView textView = (TextView) view;
Expand Down
Loading

0 comments on commit 9a579de

Please sign in to comment.