Merge pull request #7 from Microsoft/scotts-sdkversion

Set min and target SDK versions
This commit is contained in:
Scott Seiber 2016-07-07 10:27:49 -07:00 коммит произвёл GitHub
Родитель 693eeb472d f42d412377
Коммит e068ef7953
10 изменённых файлов: 66 добавлений и 24 удалений

17
.travis.yml Normal file
Просмотреть файл

@ -0,0 +1,17 @@
language: android
android:
components:
# use the latest revision of Android SDK Tools
- tools
- platform-tools
# The BuildTools version used by your project
- build-tools-23.0.3
# The SDK version used to compile your project
- android-23
# Additional components
- extra-android-m2repository
- extra-google-m2repository
- extra-google-google_play_services

Просмотреть файл

@ -6,8 +6,8 @@ android {
defaultConfig {
applicationId "loop.ms.looptestuser"
minSdkVersion 23
targetSdkVersion 23
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
@ -17,11 +17,21 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
// set to true to turn off analysis progress reporting by lint
quiet false
// if true, stop the gradle build if errors are found
abortOnError true
// if true, only report errors
ignoreWarnings false
// project specific lint options
lintConfig new File(rootProject.projectDir, "lint.xml")
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'ms.loop:loopsdk:2.0.1'
compile('ms.loop:loopsdk:2.0.1-develop') { changing = true }
}

Просмотреть файл

@ -2,6 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="loop.ms.looptestuser">
<!-- Not visible to Google App indexer -->
<!--suppress GoogleAppIndexingWarning -->
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"

Просмотреть файл

@ -11,6 +11,8 @@ import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.Locale;
import ms.loop.loopsdk.api.LoopHttpError;
import ms.loop.loopsdk.core.ILoopServiceCallback;
import ms.loop.loopsdk.core.LoopSDK;
@ -71,9 +73,9 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences
public void run(){
checkboxImageView.setVisibility(View.VISIBLE);
userIdView.setText("Current User Id\n" + LoopSDK.userId + "\n\nTest Count");
userIdView.setText(String.format(Locale.US, "Current User Id\n%s\n\nTest Count", LoopSDK.userId));
userIdView.setVisibility(View.VISIBLE);
profileCountView.setText(String.format("%.0f", score));
profileCountView.setText(String.format(Locale.US, "%.0f", score));
profileCountView.setVisibility(View.VISIBLE);
}
});

Просмотреть файл

@ -8,7 +8,7 @@
<Button
android:layout_width="match_parent"
android:layout_height="50dp"
android:text="Get test profile"
android:text="@string/get_test_profile"
android:layout_centerHorizontal="true"
android:background="#208DED"
android:textColor="#fff"
@ -42,7 +42,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Current User Id:"
android:text="@string/current_user_id"
android:layout_marginTop="20dp"
android:textColor="#FF000000"
android:textSize="20sp"

Просмотреть файл

@ -1,6 +0,0 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

Просмотреть файл

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>

Просмотреть файл

@ -1,5 +0,0 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>

Просмотреть файл

@ -1,3 +1,5 @@
<resources>
<string name="app_name">Loop Test User</string>
<string name="get_test_profile">Get test profile</string>
<string name="current_user_id">Current User Id:</string>
</resources>

26
lint.xml Normal file
Просмотреть файл

@ -0,0 +1,26 @@
<lint>
<issue id="InvalidPackage">
<!-- due to an issue with okio, we need to exclude lint errors for it -->
<!-- http://stackoverflow.com/questions/35492259/lint-error-on-okio -->
<!-- https://github.com/square/okio/issues/58 -->
<ignore regexp=".*okio.*" />
<!-- due to an issue with Apache Commons Math3, we need to exclude lint errors for it -->
<ignore regexp="org.apache.commons.math3.*" />
</issue>
<!-- Disable check for old api versions -->
<issue id="OldTargetApi" severity="ignore" />
<!-- Disable check for old versions of Gradle dependencies -->
<issue id="GradleDependency" severity="ignore" />
<!-- Disable check for 'center' attribute on API level 15 -->
<issue id="UnusedAttribute" severity="ignore" />
<!-- Disable check for drawable density -->
<issue id="IconLocation" severity="ignore" />
<!-- Disable check ImageView content description -->
<issue id="ContentDescription" severity="ignore" />
</lint>