-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#2 Added a more sophisticated example where aspect classes are spread…
… over multiple Gradle projects
- Loading branch information
Showing
12 changed files
with
82 additions
and
62 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ buildscript { | |
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
jcenter() | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath "com.github.sedovalx.gradle:gradle-aspectj-binary:$pluginVersion" | ||
} | ||
} | ||
|
||
dependencies { | ||
compile project(":examples:aspects") | ||
} | ||
|
||
apply plugin: 'application' | ||
apply plugin: 'com.github.sedovalx.gradle-aspectj-binary' | ||
|
||
mainClassName = 'com.github.sedovalx.sandbox.gradle.aspectj.examples.aspects.App' | ||
|
||
aspectjBinary { | ||
applyJavaPlugin = true | ||
weaveClasses { | ||
source = "1.7" | ||
target = "1.7" | ||
ajcSourceSets = [project.sourceSets.main] | ||
writeToLog = true | ||
} | ||
} |
4 changes: 1 addition & 3 deletions
4
...x/sandbox/gradle/aspectj/example/App.java → .../gradle/aspectj/examples/aspects/App.java
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
3 changes: 2 additions & 1 deletion
3
...pectj/example/aspects/KotlinAnnotation.kt → ...ectj/examples/aspects/KotlinAnnotation.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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
package com.github.sedovalx.sandbox.gradle.aspectj.example.aspects | ||
package com.github.sedovalx.sandbox.gradle.aspectj.examples.aspects | ||
|
||
@Retention(AnnotationRetention.RUNTIME) | ||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER) | ||
annotation class KotlinAnnotation(val value: String) |
2 changes: 1 addition & 1 deletion
2
...e/aspectj/example/aspects/KotlinAspect.kt → .../aspectj/examples/aspects/KotlinAspect.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
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 @@ | ||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath "com.github.sedovalx.gradle:gradle-aspectj-binary:$pluginVersion" | ||
} | ||
} | ||
|
||
apply plugin: 'com.github.sedovalx.gradle-aspectj-binary' | ||
|
||
dependencies { | ||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
compile "org.aspectj:aspectjrt:$aspectjVersion" | ||
compile 'com.jcabi:jcabi-aspects:0.22.6' | ||
compile 'org.slf4j:slf4j-simple:1.7.21' | ||
} |
2 changes: 1 addition & 1 deletion
2
...pectj/example/aspects/JavaAnnotation.java → ...ectj/examples/aspects/JavaAnnotation.java
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
2 changes: 1 addition & 1 deletion
2
...e/aspectj/example/aspects/JavaAspect.java → .../aspectj/examples/aspects/JavaAspect.java
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,37 +1,2 @@ | ||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
classpath "com.github.sedovalx.gradle:gradle-aspectj-binary:$pluginVersion" | ||
} | ||
} | ||
|
||
group 'com.github.sedovalx.sandbox.gradle.aspectj.example' | ||
version '1.0-SNAPSHOT' | ||
|
||
apply plugin: 'application' | ||
apply plugin: 'com.github.sedovalx.gradle-aspectj-binary' | ||
|
||
aspectjBinary { | ||
applyJavaPlugin = true | ||
weaveClasses { | ||
source = "1.8" | ||
target = "1.8" | ||
ajcSourceSets = [project.sourceSets.main] | ||
writeToLog = true | ||
} | ||
} | ||
|
||
mainClassName = "com.github.sedovalx.sandbox.gradle.aspectj.example.App" | ||
|
||
dependencies { | ||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
compile "org.aspectj:aspectjrt:$aspectjVersion" | ||
compile 'com.jcabi:jcabi-aspects:0.22.6' | ||
compile 'org.slf4j:slf4j-simple:1.7.21' | ||
} | ||
version '1.0-SNAPSHOT' |
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 +1 @@ | ||
include 'plugin', 'examples' | ||
include 'plugin', 'examples', 'examples:aspects', 'examples:app' |