diff --git a/README.md b/README.md index c1860c5..2bf3019 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,23 @@ This is an amazing image slider for the Android . You can easily load images with your custom layout, and there are many kinds of amazing animations you can choose. -```groovy - implementation 'com.github.smarteist:autoimageslider:1.4.0' +Step 1. Add the JitPack repository to your build file + +Add it in your root settings.gradle at the end of repositories: +``` + dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + mavenCentral() + maven { url 'https://jitpack.io' } + } + } +``` +Step 2. Add the dependency ``` -If you are using appcompat libraries use this one, but please migrate to androidx as soon as you can. -```groovy - implementation 'com.github.smarteist:autoimageslider:1.4.0-appcompat' + dependencies { + implementation 'com.github.Shivgupta1031:Android-Image-Slider:v1.4.4' + } ``` ### New Feautures diff --git a/app/build.gradle b/app/build.gradle index 1d380e7..de420d6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,11 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 28 + compileSdkVersion 35 + namespace "com.smarteist.imageslider" + defaultConfig { applicationId "com.smarteist.imageslider" - minSdkVersion 15 - targetSdkVersion 28 + minSdkVersion 21 + targetSdkVersion 35 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -20,14 +22,14 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'androidx.appcompat:appcompat:1.0.2' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - testImplementation 'junit:junit:4.12' - implementation 'com.github.bumptech.glide:glide:4.9.0' - annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' - androidTestImplementation 'androidx.test:runner:1.1.1' + testImplementation 'junit:junit:4.13.2' + implementation 'com.github.bumptech.glide:glide:5.0.5' + annotationProcessor 'com.github.bumptech.glide:compiler:5.0.5' + androidTestImplementation 'androidx.test:runner:1.7.0' implementation 'androidx.cardview:cardview:1.0.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0' implementation project(':autoimageslider') } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ebc2704..744cb99 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,7 +12,8 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> - + diff --git a/autoimageslider/build.gradle b/autoimageslider/build.gradle index e361b0c..8b3cae4 100644 --- a/autoimageslider/build.gradle +++ b/autoimageslider/build.gradle @@ -1,73 +1,71 @@ -apply plugin: 'com.android.library' - - -ext { - - bintrayRepo = 'android' - bintrayName = 'androidautoimageslider' - - publishedGroupId = 'com.github.smarteist' - libraryName = 'autoimageslider' - artifact = 'autoimageslider' - - libraryDescription = 'Simple, android image slider' - - siteUrl = 'https://github.com/smarteist' - gitUrl = 'https://github.com/smarteist/android-image-slider.git' - - libraryVersion = '1.4.0' - organization = 'smarteistbintray' // if you push to organization's repository. - developerId = 'smarteist' - developerName = 'Ali Hosseini' - developerEmail = 'ali.hosseini.sr@gmail.com' - - licenseName = 'The Apache Software License, Version 2.0' - licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - allLicenses = ["Apache-2.0"] - +plugins { + id "com.android.library" + id 'org.jetbrains.kotlin.android' + id "maven-publish" } android { - compileSdkVersion 29 + namespace "com.smarteist.autoimageslider" + compileSdkVersion 35 defaultConfig { - minSdkVersion 15 - targetSdkVersion 29 - versionCode 5 - versionName "1.3.9" - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - + minSdkVersion 21 + targetSdkVersion 35 + consumerProguardFiles "consumer-rules.pro" + // keep or set versionCode/versionName if you need them } buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } -} + publishing { + singleVariant("release") { + withSourcesJar() + } + } -// Add a new configuration to hold your dependencies -configurations { - libConfig + // (Optional) if you see Java toolchain warnings: + // compileOptions { + // sourceCompatibility JavaVersion.VERSION_1_8 + // targetCompatibility JavaVersion.VERSION_1_8 + // } } dependencies { - implementation fileTree(include: ['*.jar'], dir: 'libs') - //noinspection GradleCompatible - implementation 'androidx.appcompat:appcompat:1.1.0' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - + implementation "androidx.appcompat:appcompat:1.7.1" } -task copyLibs(type: Copy) { - from configurations.libConfig - into 'libs' +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + groupId = "com.github.Shivgupta1031" + artifactId = "Android-Image-Slider" // or "autoimageslider" + version = "1.4.2" + + from components.release + + pom { + name = "Android Image Slider (Fork)" + description = "Simple Android image slider (forked and updated)" + url = "https://github.com/Shivgupta1031/Android-Image-Slider" + licenses { + license { + name = "Apache-2.0" + url = "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } + scm { + url = "https://github.com/Shivgupta1031/Android-Image-Slider" + connection = "scm:git:git://github.com/Shivgupta1031/Android-Image-Slider.git" + developerConnection = "scm:git:ssh://github.com/Shivgupta1031/Android-Image-Slider.git" + } + } + } + } + } } - -apply from: 'https://raw.githubusercontent.com/smarteist/bintrayUpload/master/install.gradle' -apply from: 'https://raw.githubusercontent.com/smarteist/bintrayUpload/master/bintray.gradle' diff --git a/build.gradle b/build.gradle index 2a8aad3..9918cbc 100644 --- a/build.gradle +++ b/build.gradle @@ -1,29 +1,18 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - - +// Top-level build file buildscript { + ext.kotlin_version = "1.8.22" repositories { google() - jcenter() + mavenCentral() + maven { url "https://jitpack.io" } } dependencies { - classpath 'com.android.tools.build:gradle:4.0.0' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - jcenter() + classpath "com.android.tools.build:gradle:8.13.0" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/gradle.properties b/gradle.properties index 8de5058..520d1a9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,9 @@ android.enableJetifier=true android.useAndroidX=true org.gradle.jvmargs=-Xmx1536m +kotlin.code.style=official +kotlin.version=1.6.21 + # 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 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 728dd6d..213f8d0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Jun 11 18:51:38 IRDT 2020 +#Wed Nov 05 14:56:43 IST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..adb3fe1 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +jdk: + - openjdk11 diff --git a/settings.gradle b/settings.gradle index b4a6528..68d9046 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,20 @@ -include ':app', ':autoimageslider' \ No newline at end of file +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + maven { url "https://jitpack.io" } + } +} + +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + maven { url "https://jitpack.io" } + } +} + +rootProject.name = "Android-Image-Slider" +include(":app", ":autoimageslider")