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

Add no-op module #9

Merged
merged 1 commit into from
Apr 14, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
distribution: 'temurin'
cache: gradle
- name: Release build
run: ./gradlew draftsman:assembleRelease
run: ./gradlew :draftsman:assembleRelease :draftsman-no-op:assembleRelease
- name: Publish to MavenCentral
run: ./gradlew draftsman:publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
env:
Expand Down
3 changes: 2 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ dependencies {
implementation("androidx.core:core-ktx:1.5.0")
implementation("androidx.appcompat:appcompat:1.1.0")
implementation("com.google.android.material:material:1.1.0")
implementation(project(":draftsman"))
debugImplementation(project(":draftsman"))
releaseImplementation(project(":draftsman-no-op"))
}
24 changes: 24 additions & 0 deletions draftsman-no-op/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
plugins {
id("com.android.library")
kotlin("android")
}

android {
compileSdkVersion(29)
defaultConfig {
minSdkVersion(21)
targetSdkVersion(29)
}

sourceSets["main"].java.srcDirs(
"src/main/kotlin"
)
}

ext {
set("PUBLISH_GROUP_ID", "com.gojek.draftsman")
set("PUBLISH_VERSION", "0.0.3")
set("PUBLISH_ARTIFACT_ID", "draftsman-no-op")
}

apply(from = "${rootProject.projectDir}/scripts/publish-module.gradle")
3 changes: 3 additions & 0 deletions draftsman-no-op/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gojek.draftsman">
</manifest>
13 changes: 13 additions & 0 deletions draftsman-no-op/src/main/kotlin/com/gojek/draftsman/Draftsman.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.gojek.draftsman

import android.app.Activity

class Draftsman {

companion object {

fun install(activity: Activity) {}

fun uninstall(activity: Activity) {}
}
}
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include ( ":app", ":draftsman")
rootProject.name = "Draftsman"
include ( ":app", ":draftsman", ":draftsman-no-op")
rootProject.name = "Draftsman"