Skip to content

Commit

Permalink
upgrade this project for android api 35 and gradle plugin 8.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
duanju committed Oct 8, 2024
1 parent 700bd7f commit af8ea4c
Show file tree
Hide file tree
Showing 21 changed files with 98 additions and 160 deletions.
6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 6 additions & 29 deletions SplitEditTextView/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdk rootProject.ext.compileSdkVersion

defaultConfig {
minSdkVersion 21
targetSdkVersion 29
namespace "com.al.split_edit_text_view_lib"
minSdk rootProject.ext.minSdkVersion
targetSdk rootProject.ext.targetSdkVersion

versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

Expand All @@ -24,28 +24,5 @@ android {

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

apply plugin: 'com.novoda.bintray-release'

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.novoda:bintray-release:0.9.1'
}
}

publish {
userOrg = 'keeplearn'
groupId = 'com.open.keeplearn'
artifactId = 'SplitEditTextView'
publishVersion = '1.2.3'
desc = 'A Library Of Android UI.'
website = 'https://github.com/Chen-keeplearn/SplitEditTextView'
implementation 'androidx.appcompat:appcompat:1.7.0'
}

This file was deleted.

5 changes: 1 addition & 4 deletions SplitEditTextView/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.al.open">

/
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

import androidx.appcompat.widget.AppCompatEditText;

import com.al.split_edit_text_view_lib.R;

import java.lang.reflect.Field;

public class SplitEditTextView extends AppCompatEditText{
Expand Down
17 changes: 0 additions & 17 deletions SplitEditTextView/src/test/java/com/al/open/ExampleUnitTest.java

This file was deleted.

16 changes: 12 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = "1.3.72"
ext {
// Define your global versions here
android_gradle_plugin_version = "8.5.2"
kotlin_version = "2.0.20"
compileSdkVersion = 35
minSdkVersion = 21
targetSdkVersion = 34
}
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "com.android.tools.build:gradle:$android_gradle_plugin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -18,7 +26,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
36 changes: 21 additions & 15 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdk rootProject.ext.compileSdkVersion

defaultConfig {
applicationId "com.al.split_edit_text_view"
minSdkVersion 21
targetSdkVersion 29
namespace "com.al.split_edit_text_view"
minSdk rootProject.ext.minSdkVersion
targetSdk rootProject.ext.targetSdkVersion

versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

kotlinOptions {
jvmTarget = "1.8" // or "17" to match Kotlin JVM version
}

viewBinding {
enabled = true
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -27,14 +34,13 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
//implementation project(path: ':SplitEditTextView')
implementation 'com.open.keeplearn:SplitEditTextView:1.2.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.core:core-ktx:1.13.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation project(path: ':SplitEditTextView')
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
implementation 'com.google.android.material:material:1.12.0'

}

This file was deleted.

6 changes: 3 additions & 3 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.al.split_edit_text_view">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand All @@ -9,7 +8,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
12 changes: 10 additions & 2 deletions demo/src/main/java/com/al/split_edit_text_view/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ import android.os.Bundle
import android.widget.Toast
import com.al.open.OnInputListener
import com.al.open.SplitEditTextView
import kotlinx.android.synthetic.main.activity_main.*
import com.al.split_edit_text_view.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding // Automatically generated binding class

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(R.layout.activity_main)

btnChangeStyle.setOnClickListener {
val splitEdit1 = binding.splitEdit1
val splitEdit2 = binding.splitEdit2
val splitEdit3 = binding.splitEdit3
val btnChangeMode = binding.btnChangeMode

binding.btnChangeStyle.setOnClickListener {
when (splitEdit1.inputBoxStyle) {
SplitEditTextView.INPUT_BOX_STYLE_SINGLE -> {
splitEdit1.inputBoxStyle = SplitEditTextView.INPUT_BOX_STYLE_CONNECT
Expand Down
17 changes: 0 additions & 17 deletions demo/src/test/java/com/al/split_edit_text_view/ExampleUnitTest.kt

This file was deleted.

4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jul 25 18:34:35 CST 2020
#Tue Oct 08 11:58:09 CST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
Empty file modified gradlew
100644 → 100755
Empty file.

0 comments on commit af8ea4c

Please sign in to comment.