Update to gradle 5 and update support dependencies

This commit is contained in:
DD Liu 2019-09-09 16:15:24 -04:00
parent 743f1974c5
commit 57bcffea6c
12 changed files with 47 additions and 25 deletions

3
.gitignore vendored
View file

@ -23,3 +23,6 @@
# Gradle:
.idea/gradle.xml
.idea/libraries
.idea/caches/*
.idea/modules.xml

4
.idea/encodings.xml generated Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

4
.idea/misc.xml generated Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" />
</project>

Binary file not shown.

Binary file not shown.

View file

@ -1,33 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<list size="10">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="4" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<list size="9">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
<item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View file

@ -1,8 +1,8 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "24.0.2"
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "org.scratchjr.android"
@ -15,11 +15,13 @@ android {
}
}
flavorDimensions 'scratchjrversion'
productFlavors {
free {
dimension = 'scratchjrversion'
applicationId "org.scratchjr.androidfree"
minSdkVersion 19
targetSdkVersion 27
targetSdkVersion 28
versionCode 21
versionName "1.2.0"
}
@ -27,10 +29,10 @@ android {
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:27.1.0'
compile 'com.android.support:support-v4:27.1.0'
compile 'com.google.android.gms:play-services-analytics:15.0.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.gms:play-services-analytics:17.0.0'
}
def appModuleRootFolder = '.'
@ -89,13 +91,12 @@ class CleanScratchJrResourcesTask extends DefaultTask {
task generateScratchJrPNGs(type: GenerateScratchJrPNGsTask)
task cleanScratchJrResources(type: CleanScratchJrResourcesTask)
assemble.dependsOn switchToFree
afterEvaluate {
preBuild.dependsOn generateWebpackBundle
processFreeDebugGoogleServices.dependsOn switchToFreeGA
processFreeReleaseGoogleServices.dependsOn switchToFreeGA
prepareFreeDebugDependencies.dependsOn switchToFree
prepareFreeReleaseDependencies.dependsOn switchToFree
generateFreeReleaseResources.dependsOn generateScratchJrPNGs
generateFreeDebugResources.dependsOn generateScratchJrPNGs

View file

@ -2,7 +2,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.scratchjr.android">
<uses-sdk android:targetSdkVersion="23" android:minSdkVersion="17" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
@ -36,13 +35,15 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<intent-filter >
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="@string/share_mimetype" />
<data android:pathPattern="@string/share_extension_filter" />
<data android:host="*" />
<data android:scheme="file" />
<data android:scheme="content" />
</intent-filter>
</activity>

View file

@ -13,9 +13,9 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.util.Base64;
import android.util.Log;
import android.view.KeyEvent;

View file

@ -28,7 +28,7 @@ import android.util.Log;
* @author markroth8
*/
public class SoundRecorderManager {
private static final String LOG_TAG = "ScratchJr.SoundRecorderManager";
private static final String LOG_TAG = "SoundRecorderManager";
// Recording parameters
private static final int SAMPLE_RATE_IN_HZ_DEVICE = 22050;

View file

@ -6,10 +6,11 @@ buildscript {
url "https://maven.google.com"
}
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
classpath 'com.google.gms:google-services:3.1.0'
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View file

@ -1,6 +1,6 @@
#Wed Mar 07 11:49:06 EST 2018
#Mon Sep 09 13:26:20 EDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip