Skip to content

Commit

Permalink
升级grale版本
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoqi01 committed Dec 13, 2022
1 parent c8e5b79 commit d41ac52
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 78 deletions.
4 changes: 0 additions & 4 deletions androidx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,4 @@ dependencies {
// implementation 'com.github.JavaNoober.BackgroundLibrary:libraryx:1.6.9'
}

repositories{
maven { url 'https://dl.bintray.com/noober/maven' }
}


4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
defaultConfig {
applicationId "com.noober.backgroudlibrary"
minSdkVersion 14
targetSdkVersion 28
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -43,5 +43,5 @@ dependencies {
implementation project(':library')
// implementation 'com.github.JavaNoober.BackgroundLibrary:library:1.7.3'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<!--<category android:name="android.intent.category.LAUNCHER" />-->
<!--</intent-filter>-->
</activity>
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.TextView;

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

CheckBox cb = findViewById(R.id.cb_like_test);

cb.setClickable(true);


final Button btnLike = findViewById(R.id.btn_like);
btnLike.setOnClickListener(new View.OnClickListener() {
Expand Down
57 changes: 34 additions & 23 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="dasdasdads"
app:bl_text_gradient_orientation="horizontal"
app:bl_text_gradient_startColor="@color/colorAccent"
app:bl_text_gradient_endColor="@android:color/holo_green_dark"
android:layout_height="wrap_content"/>
app:bl_text_gradient_orientation="horizontal"
app:bl_text_gradient_startColor="@color/colorAccent" />


<Button
Expand All @@ -45,15 +45,16 @@
android:textColor="@android:color/white"
app:bl_corners_radius="4dp"
app:bl_pressed_gradient_centerColor="@android:color/holo_green_dark"
app:bl_unPressed_gradient_centerColor="@android:color/darker_gray"
app:bl_pressed_gradient_startColor="@android:color/black"
app:bl_unPressed_gradient_startColor="@android:color/white"
app:bl_pressed_gradient_endColor="@android:color/holo_red_dark"
app:bl_unPressed_gradient_endColor="@android:color/holo_blue_light"/>
app:bl_pressed_gradient_startColor="@android:color/black"
app:bl_unPressed_gradient_centerColor="@android:color/darker_gray"
app:bl_unPressed_gradient_endColor="@android:color/holo_blue_light"
app:bl_unPressed_gradient_startColor="@android:color/white" />

<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
tools:ignore="MissingConstraints">

<com.noober.background.view.BLFlow
android:layout_width="0dp"
Expand Down Expand Up @@ -124,7 +125,7 @@

<com.noober.background.view.BLTextView
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:background="@null"
android:gravity="center"
Expand All @@ -138,7 +139,7 @@

<com.noober.background.view.BLTextView
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:background="@null"
android:clickable="true"
Expand All @@ -154,7 +155,7 @@
<com.noober.background.view.BLTextView
android:id="@+id/ttt"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:gravity="center"
android:text="虚线圆角边框以及填充"
Expand Down Expand Up @@ -198,7 +199,7 @@
<TextView
android:id="@+id/cobbAngle"
android:layout_width="180dp"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="15dp"
android:gravity="center"
android:text="点击填充变色"
Expand All @@ -213,7 +214,7 @@

<EditText
android:layout_width="300dp"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="15dp"
android:background="@drawable/test_sel1"
android:clickable="true"
Expand All @@ -225,7 +226,7 @@

<com.noober.background.view.BLButton
android:layout_width="300dp"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="15dp"
android:clickable="true"
android:enabled="true"
Expand All @@ -244,7 +245,7 @@

<com.noober.background.view.BLButton
android:layout_width="300dp"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="15dp"
android:enabled="true"
android:gravity="center"
Expand All @@ -262,7 +263,7 @@

<com.noober.background.view.BLButton
android:layout_width="300dp"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="15dp"
android:background="@drawable/downbtn_blue"
android:clickable="true"
Expand All @@ -275,7 +276,7 @@

<TextView
android:layout_width="180dp"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="15dp"
android:clickable="true"
android:gravity="center"
Expand All @@ -298,7 +299,7 @@
<TextView
style="@style/test"
android:layout_width="130dp"
android:layout_height="36dp"
android:layout_height="48dp"
android:clickable="true"
android:elevation="12dp"
android:gravity="center"
Expand All @@ -309,7 +310,7 @@
<Button
android:id="@+id/btn"
android:layout_width="320dp"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:background="@null"
android:clickable="true"
Expand Down Expand Up @@ -343,7 +344,7 @@

<TextView
android:layout_width="130dp"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:gravity="center"
android:text="TextView"
Expand Down Expand Up @@ -462,6 +463,16 @@
app:bl_unChecked_drawable="@drawable/shape_gender_red" />
</RadioGroup>


<CheckBox
android:id="@+id/cb_like_test"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="dasdas"
app:bl_checked_button_drawable="@mipmap/rg_select"
app:bl_unChecked_button_drawable="@mipmap/rg_unselect" />


<Button
android:id="@+id/btn1"
android:layout_width="300dp"
Expand Down Expand Up @@ -561,7 +572,7 @@
<com.noober.background.view.BLTextView
android:id="@+id/tv_multi"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="15dp"
android:clickable="true"
android:focusable="true"
Expand All @@ -582,15 +593,15 @@
<TextView
android:id="@+id/tvTest1"
android:layout_width="130dp"
android:layout_height="36dp"
android:layout_height="48dp"
android:gravity="center"
android:text="点击文字变色"
android:textSize="20sp" />

<TextView
android:id="@+id/btnTest2"
android:layout_width="130dp"
android:layout_height="36dp"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:clickable="true"
android:focusable="true"
Expand Down
9 changes: 5 additions & 4 deletions app/src/main/res/layout/fragment_blank.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".BlankFragment"
tools:ignore="MissingPrefix">

Expand Down Expand Up @@ -39,9 +38,10 @@
app:bl_gradient_angle="0"
app:bl_gradient_endColor="#4F94CD"
app:bl_gradient_startColor="#63B8FF"
app:bl_shape="rectangle" />
app:bl_shape="rectangle"
tools:ignore="TouchTargetSizeCheck" />

<Button
<com.noober.background.view.BLButton
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_marginTop="5dp"
Expand Down Expand Up @@ -85,7 +85,8 @@
app:bl_corners_radius="20dp"
app:bl_pressed_color="#7CCD7C"
app:bl_shape="rectangle"
app:bl_unpressed_color="#7CFC00" />
app:bl_unpressed_color="#7CFC00"
tools:ignore="TextContrastCheck" />

<View
android:layout_width="50dp"
Expand Down
51 changes: 22 additions & 29 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.61'
//buildscript {
// ext.kotlin_version = '1.7.10'
//
// repositories {
// google()
// maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
// maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
// }
// dependencies {
//// classpath 'com.android.tools.build:gradle:7.3.0'
// classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
//// classpath 'com.novoda:bintray-release:0.8.1'
// // NOTE: Do not place your application dependencies here; they belong
// // in the individual module build.gradle files
//// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// }
//}

repositories {
google()
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// classpath 'com.novoda:bintray-release:0.8.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://jitpack.io' }
}

tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
}
plugins {
id 'com.android.application' version '7.3.0' apply false
id 'com.android.library' version '7.3.0' apply false
id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
}

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

4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.parallel=true

android.useAndroidX=true
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue May 26 10:37:42 CST 2020
#Wed Oct 12 19:25:22 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
zipStoreBase=GRADLE_USER_HOME
3 changes: 2 additions & 1 deletion library/background-proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@
-dontwarn com.noober.background.**
-keep public class com.noober.background.** {*;}
-keep public class android.support.v4.view.** {*;}
-keep public class android.view.LayoutInflater.** {*;}
-keep public class android.view.LayoutInflater.** {*;}
-keep public class androidx.core.view.** {*;}
7 changes: 2 additions & 5 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.library'
//apply plugin: 'bintray-release'
apply plugin: 'com.github.dcendents.android-maven'
//apply plugin: 'com.github.dcendents.android-maven'

group='com.github.JavaNoober'

Expand Down Expand Up @@ -47,7 +47,4 @@ dependencies {
// publishVersion = rootProject.publishVersion
// desc = rootProject.desc
// website = rootProject.website
//}
repositories {
mavenCentral()
}
//}
Loading

0 comments on commit d41ac52

Please sign in to comment.