Skip to content

Commit

Permalink
Merge pull request #125 from AlanCheen/feature/animation
Browse files Browse the repository at this point in the history
Feature/animation
  • Loading branch information
AlanCheen authored Nov 1, 2022
2 parents e6978c1 + 4bfde12 commit 7b06010
Show file tree
Hide file tree
Showing 23 changed files with 175 additions and 58 deletions.
53 changes: 27 additions & 26 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
//apply plugin: 'kotlin-android-extensions'
//apply plugin: 'kotlin-kapt'

//apply plugin: 'me.yifeiyuan.flap.plugin'

buildscript {
repositories {

maven {
url = "$rootProject.projectDir/repos"
}
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
}

google()
jcenter()
}
//apply plugin: 'me.yifeiyuan.flap.plugin'

dependencies {
//添加插件
// classpath files("../flap-gradle-plugin/build/generated/libs/flap-gradle-plugin.jar")
// classpath "me.yifeiyuan.flap:plugin:1.1.0-test"
}
}
//buildscript {
// repositories {
//
// maven {
// url = "$rootProject.projectDir/repos"
// }
//
// google()
// jcenter()
// }
//
// dependencies {
// //添加插件
//// classpath files("../flap-gradle-plugin/build/generated/libs/flap-gradle-plugin.jar")
//// classpath "me.yifeiyuan.flap:plugin:1.1.0-test"
// }
//}

android {
compileSdkVersion 29
Expand Down Expand Up @@ -97,19 +101,16 @@ dependencies {
implementation project(':ktmodule')

implementation project(':flap')
implementation project(':flap-animation')
implementation project(':flap-dsl-viewbinding')
implementation project(':flap-dsl-databinding')
implementation project(':flap-annotations')
// implementation project(':flap-gradle-plugin')
kapt project(':flap-compiler')

// implementation 'me.yifeiyuan.flap:flap-annotations:2.0.0'
// implementation 'me.yifeiyuan.flap:flap:2.0.0'
// kapt 'me.yifeiyuan.flap:flap-compiler:2.0.0'

implementation 'jp.wasabeef:recyclerview-animators:4.0.2'
// implementation 'com.google.code.gson:gson:2.9.1'

implementation 'com.github.bumptech.glide:glide:4.13.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2'
kapt 'com.github.bumptech.glide:compiler:4.13.2'
}
3 changes: 0 additions & 3 deletions app/src/main/java/me/yifeiyuan/flapdev/components/Banner.kt
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package me.yifeiyuan.flapdev.components

import android.util.Log
import android.widget.ImageView
import androidx.viewpager2.widget.ViewPager2
import com.bumptech.glide.Glide
import kotlinx.android.synthetic.main.fragment_base_case.view.*
import me.yifeiyuan.flap.FlapAdapter
import me.yifeiyuan.flap.dsl.adapterDelegate
import me.yifeiyuan.flapdev.FlapApplication.Companion.toast
import me.yifeiyuan.flapdev.R
import me.yifeiyuan.flapdev.enforceSingleScrollDirection

/**
* Created by 程序亦非猿 on 2022/9/11.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ package me.yifeiyuan.flapdev.testcases
import android.os.Bundle
import android.view.*
import android.widget.Toast
import androidx.core.view.get
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager2.widget.ViewPager2
import kotlinx.android.synthetic.main.fragment_base_case.view.*
import me.yifeiyuan.flap.FlapAdapter
import me.yifeiyuan.flap.ext.doOnCreateViewHolderEnd
import me.yifeiyuan.flapdev.R
import me.yifeiyuan.flapdev.Scrollable
import me.yifeiyuan.flapdev.components.SimpleTextModel
import me.yifeiyuan.flapdev.enforceSingleScrollDirection
import java.util.*

/**
Expand Down
13 changes: 7 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ buildscript {

repositories {
google()
jcenter()

maven {
url = "$rootProject.projectDir/repos"
}
mavenCentral()
// jcenter()
// maven {
// url = "$rootProject.projectDir/repos"
// }
}

dependencies {
Expand All @@ -22,7 +22,8 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
// jcenter()
maven { url 'https://jitpack.io' }
}
}
Expand Down
1 change: 1 addition & 0 deletions flap-animation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
48 changes: 48 additions & 0 deletions flap-animation/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
}

apply plugin: 'com.github.dcendents.android-maven'

group = 'me.yifeiyuan'

android {
compileSdkVersion 29

defaultConfig {
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

compileOnly 'androidx.recyclerview:recyclerview:1.2.1'
compileOnly project(':flap')
}
Empty file.
21 changes: 21 additions & 0 deletions flap-animation/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package me.yifeiyuan.flap.animation

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("me.yifeiyuan.flap.animation.test", appContext.packageName)
}
}
5 changes: 5 additions & 0 deletions flap-animation/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.yifeiyuan.flap.animation">

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package me.yifeiyuan.flap.animation

import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
4 changes: 2 additions & 2 deletions flap-compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies {
implementation project(':flap-annotations')
implementation 'com.squareup:javapoet:1.11.1'
// implementation 'com.squareup:kotlinpoet:1.10.1'
api 'com.google.auto.service:auto-service:1.0-rc6'
annotationProcessor 'com.google.auto.service:auto-service:1.0-rc6'
api 'com.google.auto.service:auto-service:1.0-rc7'
annotationProcessor 'com.google.auto.service:auto-service:1.0-rc7'
implementation 'com.google.guava:guava:21.0'
}

Expand Down
5 changes: 2 additions & 3 deletions flap-dsl-databinding/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}
Expand All @@ -40,12 +41,10 @@ android {
}

dependencies {

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

compileOnly 'androidx.recyclerview:recyclerview:1.2.1'
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
compileOnly project(':flap')
api project(':flap')
}
6 changes: 3 additions & 3 deletions flap-dsl-viewbinding/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}
Expand All @@ -40,12 +42,10 @@ android {
}

dependencies {

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

compileOnly 'androidx.recyclerview:recyclerview:1.2.1'
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
compileOnly project(':flap')
api project(':flap')
}
7 changes: 4 additions & 3 deletions flap/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation "androidx.core:core-ktx:1.6.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
compileOnly 'androidx.recyclerview:recyclerview:1.2.1'
compileOnly "androidx.core:core-ktx:1.6.0"

compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
19 changes: 12 additions & 7 deletions ktmodule/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
//apply plugin: 'com.android.library'
//apply plugin: 'kotlin-android'
//apply plugin: 'kotlin-android-extensions'
//apply plugin: 'kotlin-kapt'

plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.0"
compileSdkVersion 29

defaultConfig {
minSdkVersion 17
targetSdkVersion 30
targetSdkVersion 29
versionCode 1
versionName "1.0"

Expand Down
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
include ':flap-animation'
include ':flap-dsl-databinding'
include ':flap-dsl-viewbinding'
include ':ktmodule'
include ':flap-gradle-plugin'
//include ':flap-gradle-plugin'
include ':app'
include ':flap'
include ':flap-annotations'
Expand Down

0 comments on commit 7b06010

Please sign in to comment.