Skip to content
This repository was archived by the owner on Aug 12, 2022. It is now read-only.

Commit 57bcffe

Browse files
author
DD Liu
committed
Update to gradle 5 and update support dependencies
1 parent 743f197 commit 57bcffe

File tree

12 files changed

+47
-25
lines changed

12 files changed

+47
-25
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@
2323
# Gradle:
2424
.idea/gradle.xml
2525
.idea/libraries
26+
27+
.idea/caches/*
28+
.idea/modules.xml

.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.

android/ScratchJr/.idea/misc.xml

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/ScratchJr/app/build.gradle

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 27
5-
buildToolsVersion "24.0.2"
4+
compileSdkVersion 28
5+
buildToolsVersion "28.0.3"
66

77
defaultConfig {
88
applicationId "org.scratchjr.android"
@@ -15,22 +15,24 @@ android {
1515
}
1616
}
1717

18+
flavorDimensions 'scratchjrversion'
1819
productFlavors {
1920
free {
21+
dimension = 'scratchjrversion'
2022
applicationId "org.scratchjr.androidfree"
2123
minSdkVersion 19
22-
targetSdkVersion 27
24+
targetSdkVersion 28
2325
versionCode 21
2426
versionName "1.2.0"
2527
}
2628
}
2729
}
2830

2931
dependencies {
30-
compile fileTree(include: ['*.jar'], dir: 'libs')
31-
compile 'com.android.support:appcompat-v7:27.1.0'
32-
compile 'com.android.support:support-v4:27.1.0'
33-
compile 'com.google.android.gms:play-services-analytics:15.0.0'
32+
implementation fileTree(include: ['*.jar'], dir: 'libs')
33+
implementation 'com.google.android.gms:play-services-location:17.0.0'
34+
implementation 'androidx.appcompat:appcompat:1.1.0'
35+
implementation 'com.google.android.gms:play-services-analytics:17.0.0'
3436
}
3537

3638
def appModuleRootFolder = '.'
@@ -89,13 +91,12 @@ class CleanScratchJrResourcesTask extends DefaultTask {
8991

9092
task generateScratchJrPNGs(type: GenerateScratchJrPNGsTask)
9193
task cleanScratchJrResources(type: CleanScratchJrResourcesTask)
94+
assemble.dependsOn switchToFree
9295

9396
afterEvaluate {
9497
preBuild.dependsOn generateWebpackBundle
9598
processFreeDebugGoogleServices.dependsOn switchToFreeGA
9699
processFreeReleaseGoogleServices.dependsOn switchToFreeGA
97-
prepareFreeDebugDependencies.dependsOn switchToFree
98-
prepareFreeReleaseDependencies.dependsOn switchToFree
99100

100101
generateFreeReleaseResources.dependsOn generateScratchJrPNGs
101102
generateFreeDebugResources.dependsOn generateScratchJrPNGs

android/ScratchJr/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="org.scratchjr.android">
44

5-
<uses-sdk android:targetSdkVersion="23" android:minSdkVersion="17" />
65
<uses-permission android:name="android.permission.CAMERA" />
76
<uses-permission android:name="android.permission.INTERNET"/>
87
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
@@ -36,13 +35,15 @@
3635
<action android:name="android.intent.action.MAIN" />
3736
<category android:name="android.intent.category.LAUNCHER" />
3837
</intent-filter>
39-
<intent-filter>
38+
<intent-filter >
4039
<action android:name="android.intent.action.VIEW" />
4140
<category android:name="android.intent.category.DEFAULT" />
4241
<category android:name="android.intent.category.BROWSABLE" />
4342
<data android:mimeType="@string/share_mimetype" />
4443
<data android:pathPattern="@string/share_extension_filter" />
4544
<data android:host="*" />
45+
<data android:scheme="file" />
46+
<data android:scheme="content" />
4647
</intent-filter>
4748
</activity>
4849

android/ScratchJr/app/src/main/java/org/scratchjr/android/ScratchJrActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
import android.os.Build;
1414
import android.os.Bundle;
1515
import android.os.Handler;
16-
import android.support.annotation.NonNull;
17-
import android.support.v4.app.ActivityCompat;
18-
import android.support.v4.content.ContextCompat;
16+
import androidx.annotation.NonNull;
17+
import androidx.core.app.ActivityCompat;
18+
import androidx.core.content.ContextCompat;
1919
import android.util.Base64;
2020
import android.util.Log;
2121
import android.view.KeyEvent;

android/ScratchJr/app/src/main/java/org/scratchjr/android/SoundRecorderManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @author markroth8
2929
*/
3030
public class SoundRecorderManager {
31-
private static final String LOG_TAG = "ScratchJr.SoundRecorderManager";
31+
private static final String LOG_TAG = "SoundRecorderManager";
3232

3333
// Recording parameters
3434
private static final int SAMPLE_RATE_IN_HZ_DEVICE = 22050;

android/ScratchJr/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ buildscript {
66
url "https://maven.google.com"
77
}
88
jcenter()
9+
google()
910
}
1011
dependencies {
11-
classpath 'com.android.tools.build:gradle:2.2.1'
12-
classpath 'com.google.gms:google-services:3.1.0'
12+
classpath 'com.android.tools.build:gradle:3.4.2'
13+
classpath 'com.google.gms:google-services:4.3.2'
1314

1415
// NOTE: Do not place your application dependencies here; they belong
1516
// in the individual module build.gradle files
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Mar 07 11:49:06 EST 2018
1+
#Mon Sep 09 13:26:20 EDT 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

0 commit comments

Comments
 (0)