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

chore(sample): build variant added & no op check added to ci action #276

Merged
merged 1 commit into from
Sep 14, 2023
Merged
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: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ jobs:
- name: Build
run: ./gradlew --no-daemon --max-workers 8 --build-cache assembleDebug

build-no-op:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build No Op
run: ./gradlew --no-daemon --max-workers 8 --build-cache assembleDebugNoOp

ktlint:
runs-on: ubuntu-latest
steps:
Expand Down
17 changes: 7 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# 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
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
#Thu Sep 14 17:27:07 IST 2023
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
75 changes: 41 additions & 34 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,33 @@ android {
}

buildTypes {
/**
* build type with lib modules
*/
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debugMaven {
initWith debug
signingConfig signingConfigs.debug
matchingFallbacks = ['debug']
}

/**
* build type with lib-no-op modules
*/
debugNoOp {
initWith debug
signingConfig signingConfigs.debug
matchingFallbacks = ['debug']
}
debugNoOpMaven {
initWith debug
signingConfig signingConfigs.debug
matchingFallbacks = ['debug']
}

release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
Expand All @@ -50,44 +73,28 @@ android {
}

dependencies {
implementation project(path: ':pluto:lib')
implementation project(path: ':pluto-plugins:plugins:demo:lib')
implementation project(path: ':pluto-plugins:bundle:lib')
// implementation project(path: ':pluto-plugins:plugins-ui:bundle:lib')
// implementation project(path: ':pluto-plugins:plugins-ui:plugins:layout-inspector:lib')
// implementation project(path: ':plugins:exceptions:lib')
// implementation project(path: ':plugins:logger:lib')
// implementation project(path: ':plugins:network:lib')
// implementation project(path: ':plugins:shared-preferences:lib')
// implementation project(path: ':plugins:datastore:lib')
// implementation project(path: ':plugins:rooms-database:lib')
/* Local Op dependencies */
debugImplementation project(path: ':pluto:lib')
debugImplementation project(path: ':pluto-plugins:bundle:lib')

/**
* no-op dependencies
*/
// implementation project(path: ':pluto:lib-no-op')
// implementation project(path: ':pluto-plugins:plugins:demo:lib-no-op')
// implementation project(path: ':pluto-plugins:bundle:lib-no-op')
// implementation project(path: ':plugins:exceptions:lib-no-op')
// implementation project(path: ':plugins:logger:lib-no-op')
// implementation project(path: ':plugins:network:lib-no-op')
// implementation project(path: ':plugins:shared-preferences:lib-no-op')
// implementation project(path: ':plugins:rooms-database:lib-no-op')
// implementation project(path: ':plugins:datastore:lib-no-op')
/* Maven Op dependencies */
debugMavenImplementation "com.plutolib:pluto:$verPublish"
debugMavenImplementation "com.plutolib.plugins:bundle-core:$verPublish"

/* Local NoOp dependencies */
debugNoOpImplementation project(path: ':pluto:lib-no-op')
debugNoOpImplementation project(path: ':pluto-plugins:bundle:lib-no-op')

/* Maven NoOp dependencies */
debugNoOpMavenImplementation "com.plutolib:pluto-no-op:$verPublish"
debugNoOpMavenImplementation "com.plutolib.plugins:bundle-core-no-op:$verPublish"

releaseImplementation "com.plutolib:pluto:$verPublish"
releaseImplementation "com.plutolib.plugins:bundle-core:$verPublish"

/**
* Maven dependencies
* Other dependencies
*/
// implementation "com.plutolib:pluto:$plutoVersion"
// implementation project(path: ':plugins:demo:lib-no-op')
// implementation "com.plutolib.plugins:bundle-core:$plutoVersion"
// implementation "com.plutolib.plugins:network:$plutoVersion"
// implementation "com.plutolib.plugins:logger:$plutoVersion"
// implementation "com.plutolib.plugins:exceptions:$plutoVersion"
// implementation "com.plutolib.plugins:preferences:$plutoVersion"
// implementation "com.plutolib.plugins:rooms-database:$plutoVersion"
// implementation "com.plutolib.plugins:datastore:$plutoVersion"

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation "androidx.core:core-ktx:$androidXCoreVersion"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.sampleapp.pluto

import com.pluto.plugin.Plugin
import com.pluto.plugin.PluginGroup
import com.pluto.plugin.PluginGroupConfiguration
import com.pluto.plugins.datastore.pref.PlutoDatastorePreferencesPlugin
import com.pluto.plugins.preferences.PlutoSharePreferencesPlugin
import com.pluto.plugins.rooms.db.PlutoRoomsDatabasePlugin

class DataSourcePluginGroup : PluginGroup(ID) {

companion object {
const val ID = "datasource-group"
}

override fun getConfig(): PluginGroupConfiguration = PluginGroupConfiguration(
name = "DataSource Group"
)

override fun getPlugins(): List<Plugin> = listOf(
PlutoSharePreferencesPlugin(),
PlutoDatastorePreferencesPlugin(),
PlutoRoomsDatabasePlugin()
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.sampleapp.pluto

class DataSourcePluginGroup
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.sampleapp.pluto

class DataSourcePluginGroup
2 changes: 0 additions & 2 deletions sample/src/main/java/com/sampleapp/SampleApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.os.StrictMode
import android.os.StrictMode.ThreadPolicy
import android.os.StrictMode.VmPolicy
import android.util.Log
import com.demo.plugin.DemoPlugin
import com.pluto.Pluto
import com.pluto.plugins.datastore.pref.PlutoDatastoreWatcher
import com.pluto.plugins.exceptions.PlutoExceptions
Expand All @@ -31,7 +30,6 @@ class SampleApp : Application() {
initializeStrictMode()
super.onCreate()
Pluto.Installer(this)
.addPlugin(DemoPlugin())
.addPlugin(PlutoExceptionsPlugin())
// .addPlugin(PlutoDatastorePreferencesPlugin())
.addPlugin(PlutoNetworkPlugin())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.sampleapp.pluto

import com.pluto.plugin.Plugin
import com.pluto.plugin.PluginGroup
import com.pluto.plugin.PluginGroupConfiguration
import com.pluto.plugins.datastore.pref.PlutoDatastorePreferencesPlugin
import com.pluto.plugins.preferences.PlutoSharePreferencesPlugin
import com.pluto.plugins.rooms.db.PlutoRoomsDatabasePlugin

class DataSourcePluginGroup : PluginGroup(ID) {

companion object {
const val ID = "datasource-group"
}

override fun getConfig(): PluginGroupConfiguration = PluginGroupConfiguration(
name = "DataSource Group"
)

override fun getPlugins(): List<Plugin> = listOf(
PlutoSharePreferencesPlugin(),
PlutoDatastorePreferencesPlugin(),
PlutoRoomsDatabasePlugin()
)
}
Loading