Skip to content

Commit 9482acf

Browse files
committed
Fix Kotlin support link
1 parent f554af2 commit 9482acf

3 files changed

Lines changed: 22 additions & 19 deletions

File tree

‎AndroidAnnotations/androidannotations-core/androidannotations-api/src/main/java/org/androidannotations/api/KotlinOpen.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/**
2424
* Utility annotation to easily support kotlin-allopen plugin
2525
*
26-
* @see "https://github.com/androidannotations/androidannotations/wiki/Kotlin"
26+
* @see "https://github.com/androidannotations/androidannotations/wiki/Kotlin-support"
2727
*/
2828
@Retention(RetentionPolicy.CLASS)
2929
@Target(ElementType.TYPE)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package org.androidannotations.gradle.activity
2+
3+
import org.androidannotations.annotations.Background
4+
import org.androidannotations.annotations.EBean
5+
6+
/**
7+
* As of Kotlin 1.0.6+ and AndroidAnnotations 4.4.0, you can use the kotlin-allopen plugin
8+
* to remove the need to explicitly declare enhanced classes or methods as <code>open</code>.
9+
*
10+
* See the build.gradle file or [our wiki](https://github.com/androidannotations/androidannotations/wiki/Kotlin-support)
11+
* for details on how to use the plugin.
12+
*/
13+
@EBean
14+
class EnhancedBean {
15+
16+
@Background
17+
protected fun computeDateBackground() {
18+
// do stuff ;)
19+
}
20+
}

‎examples/kotlin/src/main/kotlin/org/androidannotations/gradle/activity/HelloAndroidActivity.kt‎

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ package org.androidannotations.gradle.activity
33
import android.app.Activity
44
import android.widget.TextView
55
import org.androidannotations.annotations.AfterViews
6+
import org.androidannotations.annotations.Background
67
import org.androidannotations.annotations.EActivity
7-
import org.androidannotations.annotations.EBean
88
import org.androidannotations.annotations.Extra
99
import org.androidannotations.annotations.UiThread
10-
import org.androidannotations.annotations.Background
1110
import org.androidannotations.annotations.ViewById
1211
import org.androidannotations.annotations.res.StringRes
1312
import org.androidannotations.gradle.R
@@ -44,19 +43,3 @@ open class HelloAndroidActivity : Activity() {
4443
helloTextView.text = helloMessage
4544
}
4645
}
47-
48-
/**
49-
* As of Kotlin 1.0.6+ and AndroidAnnotations 4.4.0, you can use the kotlin-allopen plugin
50-
* to remove the need to explicitly declare enhanced classes or methods as <code>open</code>.
51-
*
52-
* See the build.gradle file or [our wiki](https://github.com/androidannotations/androidannotations/wiki/Kotlin)
53-
* for details on how to use the plugin.
54-
*/
55-
@EBean
56-
public class EnhancedBean {
57-
58-
@Background
59-
protected fun computeDateBackground() {
60-
// do stuff ;)
61-
}
62-
}

0 commit comments

Comments
 (0)