-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Stop trying to outsmart Android - use standard Intent package name args * Mega refactor and support for stubs (fixes #1) * Fix some bugs from refactor & add dynamic feature module to prove stubs
- Loading branch information
1 parent
690b7fd
commit f57d9bb
Showing
48 changed files
with
803 additions
and
495 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
6 changes: 6 additions & 0 deletions
6
annotations/src/main/java/com/juullabs/exercise/annotations/AsStub.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,6 @@ | ||
package com.juullabs.exercise.annotations | ||
|
||
@MustBeDocumented | ||
@Target(AnnotationTarget.CLASS) | ||
@Retention(AnnotationRetention.BINARY) | ||
annotation class AsStub(val packageName: String, val className: String) |
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
9 changes: 9 additions & 0 deletions
9
annotations/src/main/java/com/juullabs/exercise/annotations/FromStub.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,9 @@ | ||
package com.juullabs.exercise.annotations | ||
|
||
import kotlin.reflect.KClass | ||
|
||
@MustBeDocumented | ||
@Target(AnnotationTarget.CLASS) | ||
@Retention(AnnotationRetention.BINARY) | ||
annotation class FromStub(val source: KClass<*>) | ||
|
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
12 changes: 12 additions & 0 deletions
12
application/src/main/java/com/juullabs/exercise/activities/CalculatorChildActivityStub.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,12 @@ | ||
package com.juullabs.exercise.activities | ||
|
||
import com.juullabs.exercise.annotations.AsStub | ||
import com.juullabs.exercise.annotations.Exercise | ||
import com.juullabs.exercise.annotations.Extra | ||
import com.juullabs.exercise.annotations.ResultContract | ||
import com.juullabs.exercise.annotations.ResultKind | ||
|
||
@Exercise(Extra("input", Int::class)) | ||
@ResultContract(ResultKind("Ok", Extra("output", Int::class))) | ||
@AsStub("com.juullabs.dynamicfeature", "CalculatorChildActivity") | ||
class CalculatorChildActivityStub |
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,3 +1,4 @@ | ||
<resources> | ||
<string name="app_name">Exercise Demo</string> | ||
<string name="title_dynamic_feature">Dynamic Feature</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
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.