Skip to content

Commit 0e7c1fd

Browse files
committed
Update gradle and configurations
1 parent de9c1ce commit 0e7c1fd

File tree

12 files changed

+66
-73
lines changed

12 files changed

+66
-73
lines changed

.idea/compiler.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

+30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

-10
This file was deleted.

.idea/runConfigurations.xml

-12
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ allprojects {
2525
Step 3. Add the dependency
2626
```gradle
2727
dependencies{
28-
implementation'com.github.squti:Guru:1.0.1'
28+
implementation'com.github.squti:Guru:1.1.0'
2929
}
3030
```
3131

build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
buildscript {
44
repositories {
55
google()
6-
jcenter()
6+
mavenCentral()
77

88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.4.1'
10+
classpath 'com.android.tools.build:gradle:7.0.3'
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files
@@ -17,7 +17,7 @@ buildscript {
1717
allprojects {
1818
repositories {
1919
google()
20-
jcenter()
20+
mavenCentral()
2121

2222
}
2323
}

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ 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-5.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

guru/build.gradle

+12-34
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,20 @@
2424

2525
apply plugin: 'com.android.library'
2626

27-
ext.versionMajor = 1
28-
ext.versionMinor = 0
29-
ext.versionPatch = 1
30-
ext.versionClassifier = null
31-
ext.isSnapshot = false
32-
ext.minimumSdkVersion = 15
3327

3428
android {
35-
compileSdkVersion 28
29+
compileSdkVersion 31
30+
buildToolsVersion "30.0.3"
3631

3732

3833
defaultConfig {
39-
minSdkVersion project.ext.minimumSdkVersion
40-
targetSdkVersion 28
41-
versionCode generateVersionCode()
42-
versionName generateVersionName()
43-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
44-
45-
34+
minSdkVersion 16
35+
targetSdkVersion 31
36+
versionCode 1
37+
versionName "1.0"
4638

39+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
40+
consumerProguardFiles 'consumer-rules.pro'
4741
}
4842

4943
buildTypes {
@@ -54,26 +48,10 @@ android {
5448
}
5549

5650
}
57-
private Integer generateVersionCode() {
58-
return ext.minimumSdkVersion * 10000000 + ext.versionMajor * 10000 + ext.versionMinor * 100 + ext.versionPatch
59-
}
60-
61-
private String generateVersionName() {
62-
String versionName = "${ext.versionMajor}.${ext.versionMinor}.${ext.versionPatch}"
63-
if (ext.versionClassifier == null && ext.isSnapshot) {
64-
ext.versionClassifier = "SNAPSHOT"
65-
}
66-
67-
if (ext.versionClassifier != null) {
68-
versionName += "-" + ext.versionClassifier
69-
}
70-
return versionName;
71-
}
7251
dependencies {
7352
implementation fileTree(dir: 'libs', include: ['*.jar'])
74-
75-
implementation 'androidx.appcompat:appcompat:1.0.2'
76-
testImplementation 'junit:junit:4.12'
77-
androidTestImplementation 'androidx.test:runner:1.2.0'
78-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
53+
implementation 'androidx.appcompat:appcompat:1.4.0'
54+
testImplementation 'junit:junit:4.13.2'
55+
androidTestImplementation 'androidx.test:runner:1.4.0'
56+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
7957
}

guru/src/main/java/com/github/squti/guru/GuruConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ int getMode() {
5757
}
5858

5959
public static class Builder {
60-
private String fileName = BuildConfig.APPLICATION_ID + ".Default_App_Preference";
60+
private String fileName = BuildConfig.LIBRARY_PACKAGE_NAME + ".Default_App_Preference";
6161
private int mode = Context.MODE_PRIVATE;
6262

6363
public Builder setFileName(String preferenceFileKey) {

sample/build.gradle

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 28
4+
compileSdkVersion 31
55
defaultConfig {
66
applicationId "com.github.squti.gurusample"
7-
minSdkVersion 15
8-
targetSdkVersion 28
7+
minSdkVersion 16
8+
targetSdkVersion 31
99
versionCode 1
1010
versionName "1.0"
1111
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -20,10 +20,10 @@ android {
2020

2121
dependencies {
2222
implementation fileTree(dir: 'libs', include: ['*.jar'])
23-
implementation 'androidx.appcompat:appcompat:1.0.0'
24-
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
25-
testImplementation 'junit:junit:4.12'
26-
androidTestImplementation 'androidx.test:runner:1.1.0'
27-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
23+
implementation 'androidx.appcompat:appcompat:1.4.0'
24+
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
25+
testImplementation 'junit:junit:4.13.2'
26+
androidTestImplementation 'androidx.test:runner:1.4.0'
27+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
2828
implementation project(':guru')
2929
}

sample/src/main/AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
<application
77
android:name=".SampleApplication"
8-
android:allowBackup="true"
98
android:icon="@mipmap/ic_launcher"
109
android:label="@string/app_name"
1110
android:roundIcon="@mipmap/ic_launcher_round"
1211
android:supportsRtl="true"
1312
android:theme="@style/AppTheme"
1413
tools:ignore="GoogleAppIndexingWarning">
15-
<activity android:name=".MainActivity">
14+
<activity android:name=".MainActivity"
15+
android:exported="true">
1616
<intent-filter>
1717
<action android:name="android.intent.action.MAIN" />
1818

0 commit comments

Comments
 (0)