-
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.
- Loading branch information
joker
committed
Aug 20, 2019
1 parent
3795288
commit 59349c0
Showing
52 changed files
with
765 additions
and
587 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
Binary file not shown.
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 was deleted.
Oops, something went wrong.
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 @@ | ||
package com.joker.maindexkeep | ||
|
||
import android.content.Context | ||
import android.support.multidex.MultiDex | ||
import android.support.multidex.MultiDexApplication | ||
import android.util.Log | ||
import com.joker.maindexkeep.model.AppReference | ||
|
||
class App : MultiDexApplication() { | ||
override fun attachBaseContext(base: Context) { | ||
super.attachBaseContext(base) | ||
val useless = AppReference() | ||
} | ||
|
||
override fun onCreate() { | ||
MultiDex.install(this) | ||
super.onCreate() | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
package com.joker.maindexkeep | ||
|
||
import android.support.v7.app.AppCompatActivity | ||
import android.os.Bundle | ||
import com.joker.maindexkeep.annotations.RuntimeAnn | ||
|
||
/** | ||
* 方法/类被运行时注解所修饰,所以当前类将会被打入 maindex | ||
*/ | ||
@RuntimeAnn | ||
class MainActivity : AppCompatActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_main) | ||
} | ||
|
||
@RuntimeAnn | ||
internal fun mainRuntime() { | ||
println("hello, world") | ||
} | ||
} |
19 changes: 0 additions & 19 deletions
19
app/src/main/java/com/joker/maindexkeep/MultiProcessService.java
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/joker/maindexkeep/MultiProcessService.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,16 @@ | ||
package com.joker.maindexkeep | ||
|
||
import android.app.Service | ||
import android.content.Intent | ||
import android.os.IBinder | ||
|
||
/** | ||
* manifest 中有注释 | ||
*/ | ||
class MultiProcessService : Service() { | ||
|
||
override fun onBind(intent: Intent): IBinder? { | ||
// TODO: Return the communication channel to the service. | ||
throw UnsupportedOperationException("Not yet implemented") | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
app/src/main/java/com/joker/maindexkeep/SecondActivity.java
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
package com.joker.maindexkeep | ||
|
||
import android.support.v7.app.AppCompatActivity | ||
import android.os.Bundle | ||
import android.widget.TextView | ||
import butterknife.BindView | ||
import com.joker.maindexkeep.annotations.RuntimeAnn | ||
|
||
/** | ||
* [BindView] 是运行时注解,所以当前类将会被打入 maindex | ||
*/ | ||
class SecondActivity : AppCompatActivity() { | ||
|
||
@BindView(R.id.tv) | ||
internal var tv: TextView? = null | ||
|
||
@RuntimeAnn | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_second) | ||
} | ||
} |
27 changes: 0 additions & 27 deletions
27
app/src/main/java/com/joker/maindexkeep/annotations/AnnotationWrapper.java
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
app/src/main/java/com/joker/maindexkeep/annotations/AnnotationWrapper.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,27 @@ | ||
package com.joker.maindexkeep.annotations | ||
|
||
import android.support.annotation.StringDef | ||
import com.joker.maindexkeep.annotations.AnnotationWrapper.Nothing.Companion.A | ||
import com.joker.maindexkeep.annotations.AnnotationWrapper.Nothing.Companion.B | ||
import com.joker.maindexkeep.model.AnnotationWrapperReference | ||
import kotlin.annotation.AnnotationRetention.SOURCE | ||
|
||
/** | ||
* 由于包含注解内部类,所以本身及本身引用的 [AnnotationWrapperReference]及 [AnnotationWrapperReference] | ||
* 的引用类都将会被打入 maindex | ||
*/ | ||
class AnnotationWrapper { | ||
|
||
fun test() { | ||
val reference = AnnotationWrapperReference() | ||
} | ||
|
||
@kotlin.annotation.Retention(SOURCE) | ||
@StringDef(A, B) | ||
annotation class Nothing { | ||
companion object { | ||
const val A = "a" | ||
const val B = "b" | ||
} | ||
} | ||
} |
11 changes: 0 additions & 11 deletions
11
app/src/main/java/com/joker/maindexkeep/annotations/ClassAnn.java
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/joker/maindexkeep/annotations/ClassAnn.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,8 @@ | ||
package com.joker.maindexkeep.annotations | ||
|
||
import kotlin.annotation.AnnotationRetention.BINARY | ||
|
||
@kotlin.annotation.Retention(BINARY) | ||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, | ||
AnnotationTarget.PROPERTY_SETTER) | ||
annotation class ClassAnn |
11 changes: 0 additions & 11 deletions
11
app/src/main/java/com/joker/maindexkeep/annotations/RuntimeAnn.java
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/joker/maindexkeep/annotations/RuntimeAnn.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.joker.maindexkeep.annotations | ||
|
||
import kotlin.annotation.AnnotationRetention.RUNTIME | ||
|
||
@kotlin.annotation.Retention(RUNTIME) | ||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, | ||
AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CLASS, AnnotationTarget.FILE, | ||
AnnotationTarget.ANNOTATION_CLASS) | ||
annotation class RuntimeAnn |
13 changes: 0 additions & 13 deletions
13
app/src/main/java/com/joker/maindexkeep/annotations/Type.java
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
app/src/main/java/com/joker/maindexkeep/annotations/Type.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,14 @@ | ||
package com.joker.maindexkeep.annotations | ||
|
||
import android.support.annotation.StringDef | ||
import kotlin.annotation.AnnotationRetention.RUNTIME | ||
|
||
@RuntimeAnn | ||
@kotlin.annotation.Retention(RUNTIME) | ||
@StringDef(Type.A, Type.B) | ||
annotation class Type { | ||
companion object { | ||
const val A = "a" | ||
const val B = "b" | ||
} | ||
} |
4 changes: 0 additions & 4 deletions
4
app/src/main/java/com/joker/maindexkeep/model/AnnotationWrapperReference.java
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
app/src/main/java/com/joker/maindexkeep/model/AnnotationWrapperReference.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,3 @@ | ||
package com.joker.maindexkeep.model | ||
|
||
class AnnotationWrapperReference : AnnotationWrapperReferenceBase() |
Oops, something went wrong.