Skip to content

Commit

Permalink
Merge pull request #4 from veepee-oss/update
Browse files Browse the repository at this point in the history
update github with internal changes
  • Loading branch information
juliocbcotta authored Jul 4, 2024
2 parents 3497ecf + e006480 commit ae479eb
Show file tree
Hide file tree
Showing 54 changed files with 638 additions and 514 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 11
java-version: 21
- name: "Set Release Version Env"
run: |
echo "RELEASE_VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 11
java-version: 21
- name: Unit Test
run: ./gradlew testDebugUnitTest
49 changes: 0 additions & 49 deletions Sample/app/build.gradle

This file was deleted.

44 changes: 44 additions & 0 deletions Sample/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
}

android {
namespace = "com.veepee.sample"

defaultConfig {
minSdk = 21
targetSdk = 34
compileSdk = 34

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
compose = true
}
}

dependencies {
testImplementation(libs.test.junit)

implementation(project(":feature_a"))
implementation(project(":feature_b"))
implementation(project(":login"))
implementation(project(":routes"))
implementation(libs.androidx.design)
implementation(libs.androidx.compose.material)
}
2 changes: 1 addition & 1 deletion Sample/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
5 changes: 3 additions & 2 deletions Sample/app/src/main/java/com/veepee/sample/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ package com.veepee.sample
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.veepee.routes.create
import com.veepee.routes.Schemas
import com.veepee.routes.feature_a.ActivityALink
import com.veepee.routes.feature_b.ActivityBLink
import com.veepee.routes.feature_b.ActivityBParameter
import com.veepee.routes.router
import com.veepee.vpcore.route.link.deeplink.UriDeepLink
import com.veepee.vpcore.route.link.deeplink.UriParameter

class MainActivity : AppCompatActivity() {

Expand All @@ -32,7 +33,7 @@ class MainActivity : AppCompatActivity() {
setContentView(R.layout.activity_main)
val uri = intent.data
if (uri != null) {
val deepLink = UriDeepLink.create(uri)
val deepLink = UriDeepLink(UriParameter(uri), Schemas.MyApp)
router.route(this, deepLink)
finish()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class SampleApplication : Application() {
add(FeatureADeepLinkMapper)
add(LoginDeepLinkMapper)

add(DeepLinkAuthenticationInterceptor)
add(ActivityLinkAuthenticationInterceptor)
add(FragmentLinkAuthenticationInterceptor)
add(0, DeepLinkAuthenticationInterceptor)
add(0, ActivityLinkAuthenticationInterceptor)
add(0, FragmentLinkAuthenticationInterceptor)
add(FeatureBComposableNameMapper)
}
}
Expand Down
26 changes: 0 additions & 26 deletions Sample/build.gradle

This file was deleted.

5 changes: 5 additions & 0 deletions Sample/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
}
33 changes: 13 additions & 20 deletions Sample/feature_a/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
}

android {
namespace "com.veepee.feature.a"

defaultConfig {
minSdkVersion 21
targetSdkVersion 33
compileSdk 33
targetSdkVersion 34
compileSdk 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -17,33 +19,24 @@ android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = "17"
}

buildFeatures {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion '1.4.6'
}
}

dependencies {

implementation libs.lang.kotlin
implementation libs.androidx.core
implementation libs.androidx.appcompat
implementation libs.material
implementation libs.androidx.constraint.layout
implementation libs.androidx.fragment
implementation project(":routes")
implementation libs.androidx.compose.foundation
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.appcompat)
}
29 changes: 11 additions & 18 deletions Sample/feature_b/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
}

android {
namespace "com.veepee.feature.b"

defaultConfig {
minSdkVersion 21
targetSdkVersion 33
compileSdk 33
targetSdkVersion 34
compileSdk 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -22,29 +23,21 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}

buildFeatures {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion '1.4.6'
}
}


dependencies {
implementation libs.lang.kotlin
implementation libs.androidx.core
implementation libs.androidx.appcompat
implementation libs.material
implementation libs.androidx.constraint.layout
implementation libs.androidx.fragment
implementation project(":routes")
implementation libs.androidx.compose.foundation
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.appcompat)
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import androidx.compose.ui.Modifier
import com.veepee.routes.feature_b.ComposableBNames
import com.veepee.routes.feature_b.FeatureBComposableEvent
import com.veepee.routes.feature_b.FeatureBComposableLink
import com.veepee.vpcore.route.link.compose.ComposableEvent
import com.veepee.vpcore.route.link.compose.ComposableLink
import com.veepee.vpcore.route.link.compose.ComposableNameMapper
import com.veepee.vpcore.route.link.compose.events.LocalLinkRouterEventHandler
Expand All @@ -33,15 +34,15 @@ object FeatureBComposableNameMapper : ComposableNameMapper<ComposableBNames> {

@Composable
override fun Map(
composableLink: ComposableLink<ComposableBNames>,
link: ComposableLink<ComposableBNames, ComposableEvent>,
modifier: Modifier
) {
val handler = LocalLinkRouterEventHandler.current
when (composableLink) {
when (link) {
is FeatureBComposableLink -> BasicText(
composableLink.parameter.message,
link.parameter.message,
modifier.clickable {
handler.publish(FeatureBComposableEvent(composableLink.parameter.message.length))
handler.publish(FeatureBComposableEvent(link.parameter.message.length))
})
}
}
Expand Down
Binary file modified Sample/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion Sample/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit ae479eb

Please sign in to comment.