Skip to content

Commit d41ac52

Browse files
author
xiaoqi01
committed
升级grale版本
1 parent c8e5b79 commit d41ac52

File tree

15 files changed

+110
-78
lines changed

15 files changed

+110
-78
lines changed

androidx/build.gradle

-4
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,4 @@ dependencies {
4545
// implementation 'com.github.JavaNoober.BackgroundLibrary:libraryx:1.6.9'
4646
}
4747

48-
repositories{
49-
maven { url 'https://dl.bintray.com/noober/maven' }
50-
}
51-
5248

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88
defaultConfig {
99
applicationId "com.noober.backgroudlibrary"
1010
minSdkVersion 14
11-
targetSdkVersion 28
11+
targetSdkVersion 31
1212
versionCode 1
1313
versionName "1.0"
1414
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -43,5 +43,5 @@ dependencies {
4343
implementation project(':library')
4444
// implementation 'com.github.JavaNoober.BackgroundLibrary:library:1.7.3'
4545

46-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
46+
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
4747
}

app/src/main/AndroidManifest.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
<!--<category android:name="android.intent.category.LAUNCHER" />-->
1919
<!--</intent-filter>-->
2020
</activity>
21-
<activity android:name=".MainActivity">
21+
<activity android:name=".MainActivity"
22+
android:exported="true">
2223
<intent-filter>
2324
<action android:name="android.intent.action.MAIN" />
2425

app/src/main/java/com/noober/backgroudlibrary/MainActivity.java

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import android.support.v7.app.AppCompatActivity;
1313
import android.view.View;
1414
import android.widget.Button;
15+
import android.widget.CheckBox;
1516
import android.widget.TextView;
1617

1718
import com.noober.background.BackgroundLibrary;
@@ -89,6 +90,10 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
8990
tvTest4.setBackgroundDrawable(drawable4);
9091
}
9192

93+
CheckBox cb = findViewById(R.id.cb_like_test);
94+
95+
cb.setClickable(true);
96+
9297

9398
final Button btnLike = findViewById(R.id.btn_like);
9499
btnLike.setOnClickListener(new View.OnClickListener() {

app/src/main/res/layout/activity_main.xml

+34-23
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
<TextView
1717
android:layout_width="wrap_content"
18+
android:layout_height="wrap_content"
1819
android:text="dasdasdads"
19-
app:bl_text_gradient_orientation="horizontal"
20-
app:bl_text_gradient_startColor="@color/colorAccent"
2120
app:bl_text_gradient_endColor="@android:color/holo_green_dark"
22-
android:layout_height="wrap_content"/>
21+
app:bl_text_gradient_orientation="horizontal"
22+
app:bl_text_gradient_startColor="@color/colorAccent" />
2323

2424

2525
<Button
@@ -45,15 +45,16 @@
4545
android:textColor="@android:color/white"
4646
app:bl_corners_radius="4dp"
4747
app:bl_pressed_gradient_centerColor="@android:color/holo_green_dark"
48-
app:bl_unPressed_gradient_centerColor="@android:color/darker_gray"
49-
app:bl_pressed_gradient_startColor="@android:color/black"
50-
app:bl_unPressed_gradient_startColor="@android:color/white"
5148
app:bl_pressed_gradient_endColor="@android:color/holo_red_dark"
52-
app:bl_unPressed_gradient_endColor="@android:color/holo_blue_light"/>
49+
app:bl_pressed_gradient_startColor="@android:color/black"
50+
app:bl_unPressed_gradient_centerColor="@android:color/darker_gray"
51+
app:bl_unPressed_gradient_endColor="@android:color/holo_blue_light"
52+
app:bl_unPressed_gradient_startColor="@android:color/white" />
5353

5454
<android.support.constraint.ConstraintLayout
5555
android:layout_width="match_parent"
56-
android:layout_height="match_parent">
56+
android:layout_height="match_parent"
57+
tools:ignore="MissingConstraints">
5758

5859
<com.noober.background.view.BLFlow
5960
android:layout_width="0dp"
@@ -124,7 +125,7 @@
124125

125126
<com.noober.background.view.BLTextView
126127
android:layout_width="wrap_content"
127-
android:layout_height="36dp"
128+
android:layout_height="48dp"
128129
android:layout_marginTop="5dp"
129130
android:background="@null"
130131
android:gravity="center"
@@ -138,7 +139,7 @@
138139

139140
<com.noober.background.view.BLTextView
140141
android:layout_width="wrap_content"
141-
android:layout_height="36dp"
142+
android:layout_height="48dp"
142143
android:layout_marginTop="5dp"
143144
android:background="@null"
144145
android:clickable="true"
@@ -154,7 +155,7 @@
154155
<com.noober.background.view.BLTextView
155156
android:id="@+id/ttt"
156157
android:layout_width="wrap_content"
157-
android:layout_height="36dp"
158+
android:layout_height="48dp"
158159
android:layout_marginTop="5dp"
159160
android:gravity="center"
160161
android:text="虚线圆角边框以及填充"
@@ -198,7 +199,7 @@
198199
<TextView
199200
android:id="@+id/cobbAngle"
200201
android:layout_width="180dp"
201-
android:layout_height="36dp"
202+
android:layout_height="48dp"
202203
android:layout_marginTop="15dp"
203204
android:gravity="center"
204205
android:text="点击填充变色"
@@ -213,7 +214,7 @@
213214

214215
<EditText
215216
android:layout_width="300dp"
216-
android:layout_height="36dp"
217+
android:layout_height="48dp"
217218
android:layout_marginTop="15dp"
218219
android:background="@drawable/test_sel1"
219220
android:clickable="true"
@@ -225,7 +226,7 @@
225226

226227
<com.noober.background.view.BLButton
227228
android:layout_width="300dp"
228-
android:layout_height="36dp"
229+
android:layout_height="48dp"
229230
android:layout_marginTop="15dp"
230231
android:clickable="true"
231232
android:enabled="true"
@@ -244,7 +245,7 @@
244245

245246
<com.noober.background.view.BLButton
246247
android:layout_width="300dp"
247-
android:layout_height="36dp"
248+
android:layout_height="48dp"
248249
android:layout_marginTop="15dp"
249250
android:enabled="true"
250251
android:gravity="center"
@@ -262,7 +263,7 @@
262263

263264
<com.noober.background.view.BLButton
264265
android:layout_width="300dp"
265-
android:layout_height="36dp"
266+
android:layout_height="48dp"
266267
android:layout_marginTop="15dp"
267268
android:background="@drawable/downbtn_blue"
268269
android:clickable="true"
@@ -275,7 +276,7 @@
275276

276277
<TextView
277278
android:layout_width="180dp"
278-
android:layout_height="36dp"
279+
android:layout_height="48dp"
279280
android:layout_marginTop="15dp"
280281
android:clickable="true"
281282
android:gravity="center"
@@ -298,7 +299,7 @@
298299
<TextView
299300
style="@style/test"
300301
android:layout_width="130dp"
301-
android:layout_height="36dp"
302+
android:layout_height="48dp"
302303
android:clickable="true"
303304
android:elevation="12dp"
304305
android:gravity="center"
@@ -309,7 +310,7 @@
309310
<Button
310311
android:id="@+id/btn"
311312
android:layout_width="320dp"
312-
android:layout_height="36dp"
313+
android:layout_height="48dp"
313314
android:layout_marginTop="5dp"
314315
android:background="@null"
315316
android:clickable="true"
@@ -343,7 +344,7 @@
343344

344345
<TextView
345346
android:layout_width="130dp"
346-
android:layout_height="36dp"
347+
android:layout_height="48dp"
347348
android:layout_marginTop="5dp"
348349
android:gravity="center"
349350
android:text="TextView"
@@ -462,6 +463,16 @@
462463
app:bl_unChecked_drawable="@drawable/shape_gender_red" />
463464
</RadioGroup>
464465

466+
467+
<CheckBox
468+
android:id="@+id/cb_like_test"
469+
android:layout_width="wrap_content"
470+
android:layout_height="wrap_content"
471+
android:text="dasdas"
472+
app:bl_checked_button_drawable="@mipmap/rg_select"
473+
app:bl_unChecked_button_drawable="@mipmap/rg_unselect" />
474+
475+
465476
<Button
466477
android:id="@+id/btn1"
467478
android:layout_width="300dp"
@@ -561,7 +572,7 @@
561572
<com.noober.background.view.BLTextView
562573
android:id="@+id/tv_multi"
563574
android:layout_width="wrap_content"
564-
android:layout_height="36dp"
575+
android:layout_height="48dp"
565576
android:layout_marginTop="15dp"
566577
android:clickable="true"
567578
android:focusable="true"
@@ -582,15 +593,15 @@
582593
<TextView
583594
android:id="@+id/tvTest1"
584595
android:layout_width="130dp"
585-
android:layout_height="36dp"
596+
android:layout_height="48dp"
586597
android:gravity="center"
587598
android:text="点击文字变色"
588599
android:textSize="20sp" />
589600

590601
<TextView
591602
android:id="@+id/btnTest2"
592603
android:layout_width="130dp"
593-
android:layout_height="36dp"
604+
android:layout_height="48dp"
594605
android:layout_marginTop="5dp"
595606
android:clickable="true"
596607
android:focusable="true"

app/src/main/res/layout/fragment_blank.xml

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7-
android:orientation="vertical"
87
tools:context=".BlankFragment"
98
tools:ignore="MissingPrefix">
109

@@ -39,9 +38,10 @@
3938
app:bl_gradient_angle="0"
4039
app:bl_gradient_endColor="#4F94CD"
4140
app:bl_gradient_startColor="#63B8FF"
42-
app:bl_shape="rectangle" />
41+
app:bl_shape="rectangle"
42+
tools:ignore="TouchTargetSizeCheck" />
4343

44-
<Button
44+
<com.noober.background.view.BLButton
4545
android:layout_width="300dp"
4646
android:layout_height="50dp"
4747
android:layout_marginTop="5dp"
@@ -85,7 +85,8 @@
8585
app:bl_corners_radius="20dp"
8686
app:bl_pressed_color="#7CCD7C"
8787
app:bl_shape="rectangle"
88-
app:bl_unpressed_color="#7CFC00" />
88+
app:bl_unpressed_color="#7CFC00"
89+
tools:ignore="TextContrastCheck" />
8990

9091
<View
9192
android:layout_width="50dp"

build.gradle

+22-29
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,27 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

3-
buildscript {
4-
ext.kotlin_version = '1.3.61'
3+
//buildscript {
4+
// ext.kotlin_version = '1.7.10'
5+
//
6+
// repositories {
7+
// google()
8+
// maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
9+
// maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
10+
// }
11+
// dependencies {
12+
//// classpath 'com.android.tools.build:gradle:7.3.0'
13+
// classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
14+
//// classpath 'com.novoda:bintray-release:0.8.1'
15+
// // NOTE: Do not place your application dependencies here; they belong
16+
// // in the individual module build.gradle files
17+
//// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
18+
// }
19+
//}
520

6-
repositories {
7-
google()
8-
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
9-
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
10-
}
11-
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.3.1'
13-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
14-
// classpath 'com.novoda:bintray-release:0.8.1'
15-
// NOTE: Do not place your application dependencies here; they belong
16-
// in the individual module build.gradle files
17-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
18-
}
19-
}
20-
21-
allprojects {
22-
repositories {
23-
google()
24-
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
25-
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
26-
maven { url 'https://jitpack.io' }
27-
}
28-
29-
tasks.withType(Javadoc) {
30-
options.addStringOption('Xdoclint:none', '-quiet')
31-
options.addStringOption('encoding', 'UTF-8')
32-
}
21+
plugins {
22+
id 'com.android.application' version '7.3.0' apply false
23+
id 'com.android.library' version '7.3.0' apply false
24+
id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
3325
}
3426

3527
task clean(type: Delete) {
@@ -46,3 +38,4 @@ ext {
4638
website = 'https://github.com/JavaNoober/BackgroundLibrary'
4739
// gradlew clean build bintrayUpload -PbintrayUser=xiaoqiandroid -PbintrayKey=xxxxxxxxxxxxxxxx -PdryRun=false
4840
}
41+

gradle.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ org.gradle.jvmargs=-Xmx1536m
1010
# When configured, Gradle will run in incubating parallel mode.
1111
# This option should only be used with decoupled projects. More details, visit
1212
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13-
# org.gradle.parallel=true
13+
# org.gradle.parallel=true
14+
15+
android.useAndroidX=true
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue May 26 10:37:42 CST 2020
1+
#Wed Oct 12 19:25:22 CST 2022
22
distributionBase=GRADLE_USER_HOME
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
34
distributionPath=wrapper/dists
4-
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
6+
zipStoreBase=GRADLE_USER_HOME

library/background-proguard-rules.pro

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@
2323
-dontwarn com.noober.background.**
2424
-keep public class com.noober.background.** {*;}
2525
-keep public class android.support.v4.view.** {*;}
26-
-keep public class android.view.LayoutInflater.** {*;}
26+
-keep public class android.view.LayoutInflater.** {*;}
27+
-keep public class androidx.core.view.** {*;}

library/build.gradle

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.android.library'
22
//apply plugin: 'bintray-release'
3-
apply plugin: 'com.github.dcendents.android-maven'
3+
//apply plugin: 'com.github.dcendents.android-maven'
44

55
group='com.github.JavaNoober'
66

@@ -47,7 +47,4 @@ dependencies {
4747
// publishVersion = rootProject.publishVersion
4848
// desc = rootProject.desc
4949
// website = rootProject.website
50-
//}
51-
repositories {
52-
mavenCentral()
53-
}
50+
//}

0 commit comments

Comments
 (0)