Skip to content

Commit 895aafb

Browse files
committed
gradle升级到最新版本
1 parent 6371e52 commit 895aafb

16 files changed

Lines changed: 64 additions & 405 deletions

File tree

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1-
apply plugin: 'com.android.application'
1+
plugins {
2+
id 'com.android.application'
3+
}
24

35
android {
4-
compileSdkVersion 29
5-
buildToolsVersion "29.0.0"
6+
compileSdk cfgs.compileSdk
67

78
defaultConfig {
89
applicationId "com.ansen.testshape"
9-
minSdkVersion 14
10-
targetSdkVersion 29
10+
minSdk cfgs.minSdk
11+
targetSdk cfgs.targetSdk
1112
versionCode 1
1213
versionName "1.0"
13-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1414
}
15+
1516
buildTypes {
1617
release {
1718
minifyEnabled false
1819
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
1920
}
2021
}
22+
compileOptions {
23+
sourceCompatibility JavaVersion.VERSION_1_8
24+
targetCompatibility JavaVersion.VERSION_1_8
25+
}
2126
}
2227

2328
dependencies {
2429
implementation fileTree(dir: 'libs', include: ['*.jar'])
25-
implementation 'androidx.appcompat:appcompat:1.1.0'
26-
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
27-
testImplementation 'junit:junit:4.12'
28-
androidTestImplementation 'androidx.test:runner:1.2.0'
29-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
30+
implementation "androidx.appcompat:appcompat:$cfgs.appcompatVersion"
31+
implementation "androidx.constraintlayout:constraintlayout:$cfgs.constraintlayout"
3032

3133
implementation project(path: ':shape')
32-
// implementation 'com.github.ansen666:ShapeView:1.3.5'
34+
// implementation 'com.github.ansen666:ShapeView:1.3.7'
3335
}

app/src/androidTest/java/com/ansen/testshape/ExampleInstrumentedTest.java

Lines changed: 0 additions & 27 deletions
This file was deleted.

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@
1010
android:supportsRtl="true"
1111
android:theme="@style/AppTheme">
1212

13-
<activity android:name=".MainActivity">
13+
<activity android:name=".MainActivity"
14+
android:exported="true">
1415
<intent-filter>
1516
<action android:name="android.intent.action.MAIN" />
1617
<category android:name="android.intent.category.LAUNCHER" />
1718
</intent-filter>
1819
</activity>
1920

20-
<activity android:name=".SingleTestActivity">
21-
22-
</activity>
21+
<activity
22+
android:exported="true"
23+
android:name=".SingleTestActivity"/>
2324
</application>
2425

2526
</manifest>

app/src/test/java/com/ansen/testshape/ExampleUnitTest.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

build.gradle

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,10 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
3-
buildscript {
4-
repositories {
5-
google()
6-
jcenter()
7-
mavenCentral()
8-
maven { url 'https://jitpack.io' }
9-
}
10-
11-
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.5.0'
13-
14-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
15-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
16-
17-
// NOTE: Do not place your application dependencies here; they belong
18-
// in the individual module build.gradle files
19-
}
1+
plugins {
2+
id 'com.android.application' version '7.2.1' apply false
3+
id 'com.android.library' version '7.2.1' apply false
204
}
215

22-
allprojects {
23-
repositories {
24-
google()
25-
jcenter()
26-
mavenCentral()
27-
maven { url 'https://jitpack.io' }
28-
29-
tasks.withType(Javadoc) {
30-
options.addStringOption('Xdoclint:none', '-quiet')
31-
options.addStringOption('encoding', 'UTF-8')
32-
}
33-
}
34-
}
6+
apply from: "config.gradle"
357

368
task clean(type: Delete) {
379
delete rootProject.buildDir
38-
}
39-
10+
}

config.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
ext {
2+
cfgs = [
3+
compileSdk : 32,
4+
minSdk : 21,
5+
targetSdk : 32,
6+
appcompatVersion : "1.3.0",
7+
constraintlayout : "2.0.4"
8+
]
9+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Oct 10 20:32:57 CST 2019
1+
#Mon Jul 04 19:15:01 CST 2022
22
distributionBase=GRADLE_USER_HOME
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
34
distributionPath=wrapper/dists
4-
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
zipStoreBase=GRADLE_USER_HOME

maven-publish.gradle

Lines changed: 0 additions & 113 deletions
This file was deleted.

settings.gradle

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
1+
pluginManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
google()
5+
mavenCentral()
6+
maven { url "https://jitpack.io" }
7+
}
8+
}
9+
10+
dependencyResolutionManagement {
11+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)//强制设置存储库
12+
repositories {
13+
google()
14+
mavenCentral()
15+
maven { url "https://jitpack.io" }
16+
}
17+
}
18+
119
include ':app', ':shape'
220
rootProject.name='ShapeView'

0 commit comments

Comments
 (0)