-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update to xprocessing * ksp sample module * Tests * fix lint * add back ksp impl * optimize default method lookup * fix test and bump to beta2
- Loading branch information
Showing
330 changed files
with
45,598 additions
and
3,923 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
POM_NAME=Epoxy Compose Interop | ||
POM_ARTIFACT_ID=epoxy-compose | ||
POM_PACKAGING=jar | ||
VERSION_NAME=4.6.4-alpha01 | ||
POM_PACKAGING=jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,6 @@ android { | |
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
useIR = true | ||
} | ||
buildFeatures { | ||
dataBinding true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ android { | |
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
useIR = true | ||
} | ||
buildFeatures { | ||
compose true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'kotlin-android' | ||
} | ||
//apply plugin: 'com.google.devtools.ksp' | ||
apply plugin: 'kotlin-kapt' | ||
|
||
android { | ||
compileSdkVersion rootProject.COMPILE_SDK_VERSION | ||
|
||
defaultConfig { | ||
applicationId "com.airbnb.epoxy.compose.sample" | ||
minSdkVersion rootProject.COMPOSE_MIN_SDK_VERSION | ||
targetSdkVersion rootProject.TARGET_SDK_VERSION | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
} | ||
|
||
project.android.buildTypes.all { buildType -> | ||
buildType.javaCompileOptions.annotationProcessorOptions.arguments = | ||
[ | ||
validateEpoxyModelUsage: "true", | ||
logEpoxyTimings : "true", | ||
] | ||
} | ||
|
||
//ksp { | ||
// arg("logEpoxyTimings", "true") | ||
// arg("validateEpoxyModelUsage", "true") | ||
//} | ||
|
||
dependencies { | ||
implementation project(':epoxy-adapter') | ||
implementation project(':epoxy-annotations') | ||
// ksp project(':epoxy-processor') | ||
This comment has been minimized.
Sorry, something went wrong. |
||
// ksp rootProject.deps.parisProcessor | ||
kapt project(':epoxy-processor') | ||
kapt rootProject.deps.parisProcessor | ||
|
||
implementation rootProject.deps.androidAppcompat | ||
implementation rootProject.deps.androidDesignLibrary | ||
implementation rootProject.deps.paris | ||
implementation rootProject.deps.androidCoreKtx | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest package="com.airbnb.epoxy.ksp.sample" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<application android:label="@string/app_name"> | ||
<activity | ||
android:name="com.airbnb.epoxy.ksp.sample.MainActivity" | ||
android:exported="true" | ||
android:label="@string/app_name" | ||
android:theme="@style/Theme.AppCompat.Light.NoActionBar"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
20 changes: 20 additions & 0 deletions
20
epoxy-kspsample/src/main/java/com/airbnb/epoxy/ksp/sample/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.airbnb.epoxy.ksp.sample | ||
|
||
import android.os.Bundle | ||
import androidx.appcompat.app.AppCompatActivity | ||
import com.airbnb.epoxy.EpoxyRecyclerView | ||
import com.airbnb.epoxy.ksp.sample.epoxyviews.headerView | ||
|
||
class MainActivity : AppCompatActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_main) | ||
|
||
findViewById<EpoxyRecyclerView>(R.id.epoxy_recycler_view).withModels { | ||
headerView { | ||
id("header") | ||
title("Hello World") | ||
} | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
epoxy-kspsample/src/main/java/com/airbnb/epoxy/ksp/sample/epoxyviews/EpoxyConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.airbnb.epoxy.ksp.sample.epoxyviews | ||
|
||
import com.airbnb.epoxy.ksp.sample.R | ||
import com.airbnb.paris.annotations.ParisConfig | ||
|
||
@ParisConfig(rClass = R::class) | ||
object EpoxyConfig |
58 changes: 58 additions & 0 deletions
58
epoxy-kspsample/src/main/java/com/airbnb/epoxy/ksp/sample/epoxyviews/HeaderView.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.airbnb.epoxy.ksp.sample.epoxyviews | ||
|
||
import android.content.Context | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import android.widget.ImageView | ||
import android.widget.LinearLayout | ||
import android.widget.TextView | ||
import com.airbnb.epoxy.ModelProp | ||
import com.airbnb.epoxy.ModelView | ||
import com.airbnb.epoxy.TextProp | ||
import com.airbnb.epoxy.ksp.sample.R | ||
import com.airbnb.paris.annotations.Style | ||
import com.airbnb.paris.annotations.Styleable | ||
import com.airbnb.paris.extensions.headerViewStyle | ||
import com.airbnb.paris.extensions.layoutHeight | ||
import com.airbnb.paris.extensions.layoutWidth | ||
|
||
@Styleable // Dynamic styling via the Paris library | ||
@ModelView | ||
class HeaderView(context: Context?) : LinearLayout(context) { | ||
private var title: TextView? = null | ||
private var caption: TextView? = null | ||
private var image: ImageView? = null | ||
|
||
init { | ||
orientation = VERTICAL | ||
inflate(getContext(), R.layout.header_view, this) | ||
|
||
title = findViewById(R.id.title_text) | ||
caption = findViewById(R.id.caption_text) | ||
image = findViewById(R.id.image) | ||
} | ||
|
||
@TextProp(defaultRes = R.string.app_name) | ||
fun setTitle(title: CharSequence?) { | ||
this.title?.text = title | ||
} | ||
|
||
@TextProp | ||
fun setCaption(caption: CharSequence?) { | ||
this.caption?.text = caption | ||
} | ||
|
||
@JvmOverloads | ||
@ModelProp | ||
fun setShowImage(isVisible: Boolean = false) { | ||
image?.visibility = if (isVisible) View.VISIBLE else View.GONE | ||
} | ||
|
||
companion object { | ||
@Style(isDefault = true) | ||
val headerStyle: com.airbnb.paris.styles.Style = headerViewStyle { | ||
layoutWidth(ViewGroup.LayoutParams.MATCH_PARENT) | ||
layoutHeight(ViewGroup.LayoutParams.MATCH_PARENT) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<com.airbnb.epoxy.EpoxyRecyclerView xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/epoxy_recycler_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
</com.airbnb.epoxy.EpoxyRecyclerView> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<ImageView | ||
android:layout_gravity="center" | ||
android:id="@+id/image" | ||
android:layout_width="200dp" | ||
android:layout_height="200dp" | ||
android:visibility="gone" /> | ||
|
||
<TextView | ||
android:id="@+id/title_text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:gravity="center" | ||
android:lineSpacingMultiplier="0.8" | ||
android:paddingTop="8dp" | ||
android:textColor="#000000" | ||
android:textSize="16sp" /> | ||
|
||
<TextView | ||
android:id="@+id/caption_text" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="8dp" | ||
android:gravity="center" | ||
android:textColor="#000000" | ||
android:textSize="20sp" | ||
tools:text="caption" /> | ||
|
||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<resources> | ||
<string name="app_name">Epoxy KSP Sample</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Not sure if this is intentional, but if you have been testing using this project, you realize ksp isnt processing right?