Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update project #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To achieve the same grid-looking view you should:
1. Include the library as local library project:

``` groovy
compile 'com.yalantis:flipviewpager:1.0.0'
implementation 'com.yalantis:flipviewpager:1.0.1'
```

2. Create your main layout, it will be the view with 2 items merged together:
Expand Down Expand Up @@ -133,6 +133,11 @@ FlipSettings settings = new FlipSettings.Builder().defaultPage(1).build();

# Changelog

### Version: 1.0.1

* Update dependencies
* Migrate to AndroidX

### Version: 1.0

* Initial Build
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

Expand All @@ -15,5 +16,6 @@ allprojects {

repositories {
mavenCentral()
google()
}
}
16 changes: 8 additions & 8 deletions flipviewpager/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion 33
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
targetSdkVersion 33
versionCode 2
versionName "1.0.1"
}
buildTypes {
release {
Expand All @@ -19,9 +19,9 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.appcompat:appcompat:1.5.1"
implementation "androidx.recyclerview:recyclerview:1.2.1"
}

apply from: '../mavenpush.gradle'
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.yalantis.flipviewpager.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import androidx.recyclerview.widget.RecyclerView;

import com.yalantis.flipviewpager.R;
import com.yalantis.flipviewpager.utils.FlipSettings;
import com.yalantis.flipviewpager.view.FlipViewPager;
Expand Down
8 changes: 6 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

VERSION_NAME=1.0.0
VERSION_CODE=1
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

VERSION_NAME=1.0.1
VERSION_CODE=2
GROUP=com.yalantis

POM_DESCRIPTION=Android flip viewpager implementation
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
54 changes: 30 additions & 24 deletions mavenpush.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'

def isReleaseBuild() {
Expand Down Expand Up @@ -26,51 +26,57 @@ def getRepositoryPassword() {
}

afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

pom.artifactId = POM_ARTIFACT_ID
publishing {
publications {
mavenJava(MavenPublication) {

repository(url: sonatypeRepositoryUrl) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
artifactId = POM_ARTIFACT_ID

pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL
pom {
name = POM_NAME
packaging = POM_PACKAGING
description = POM_DESCRIPTION
url = POM_URL

scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
url = POM_SCM_URL
connection = POM_SCM_CONNECTION
developerConnection = POM_SCM_DEV_CONNECTION
}

licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
name = POM_LICENCE_NAME
url = POM_LICENCE_URL
distribution = POM_LICENCE_DIST
}
}

developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
id = POM_DEVELOPER_ID
name = POM_DEVELOPER_NAME
}
}
}
}
}

repositories {
maven {
url = sonatypeRepositoryUrl

credentials {
username = getRepositoryUsername()
password = getRepositoryPassword()
}
}
}
}

signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
sign publishing.publications.mavenJava
}

task androidJavadocs(type: Javadoc) {
Expand Down
16 changes: 8 additions & 8 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion 33
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.yalantis.flip.sample"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
targetSdkVersion 33
versionCode 2
versionName "1.0.1"
}
buildTypes {
release {
Expand All @@ -20,7 +20,7 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile project(':flipviewpager')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':flipviewpager')
implementation "androidx.appcompat:appcompat:1.5.1"
}
5 changes: 3 additions & 2 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >s
android:theme="@style/AppTheme" >
<activity
android:name=".activity.FriendsActivity"
android:screenOrientation="portrait"
android:label="@string/app_name" >
android:label="@string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.yalantis.flip.sample.activity;

import android.support.v7.app.ActionBarActivity;

import androidx.appcompat.app.AppCompatActivity;

/**
* @author Yalantis
*/
public class FriendsActivity extends ActionBarActivity {
public class FriendsActivity extends AppCompatActivity {
//
// @Override
// protected void onCreate(Bundle savedInstanceState) {
Expand Down