File tree Expand file tree Collapse file tree
src/main/java/com/thirdegg/binco Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ dependencies {
1717 implementation ' org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31'
1818 kapt project(" :binco" )
1919 compileOnly project(" :binco" )
20- testCompile group : ' junit' , name : ' junit' , version : ' 4.12'
2120}
2221
2322compileKotlin {
Original file line number Diff line number Diff line change @@ -2,11 +2,9 @@ plugins {
22 id ' java'
33 id ' kotlin'
44 id ' kotlin-kapt'
5+ id ' maven-publish'
56}
67
7- group ' com.duxcast'
8- version ' 1.0'
9-
108sourceCompatibility = 1.8
119
1210repositories {
1816}
1917
2018sourceSets {
21- main {
19+ named( " main" ) {
2220 java {
2321 srcDir " ${ buildDir.absolutePath} /tmp/kapt/main/kotlinGenerated/"
2422 }
@@ -27,8 +25,6 @@ sourceSets {
2725
2826dependencies {
2927 implementation ' org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31'
30- testCompile group : ' junit' , name : ' junit' , version : ' 4.12'
31-
3228 implementation " com.squareup:kotlinpoet:1.10.1"
3329
3430 implementation ' com.google.auto.service:auto-service:1.0'
@@ -41,4 +37,18 @@ compileKotlin {
4137}
4238compileTestKotlin {
4339 kotlinOptions. jvmTarget = " 1.8"
40+ }
41+
42+ afterEvaluate {
43+ publishing {
44+ publications {
45+ release(MavenPublication ) {
46+ from(components[" java" ])
47+ groupId = ' com.github.thirdegg'
48+ artifactId = ' binco'
49+ version = ' 0.0.2-alpha'
50+ // artifact(sourceJar)
51+ }
52+ }
53+ }
4454}
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class BincoProcessor : AbstractProcessor() {
3434 return false
3535 }
3636
37- roundEnv.getElementsAnnotatedWithAny( setOf ( Binco ::class .java) ).forEach { element ->
37+ roundEnv.getElementsAnnotatedWith( Binco ::class .java).forEach { element ->
3838
3939 if (element.kind == ElementKind .INTERFACE ) {
4040
@@ -86,7 +86,7 @@ class BincoProcessor : AbstractProcessor() {
8686 return false
8787 }
8888
89- roundEnv.getElementsAnnotatedWithAny( setOf ( Binco .Field ::class .java) ).forEach { element ->
89+ roundEnv.getElementsAnnotatedWith( Binco .Field ::class .java).forEach { element ->
9090
9191 if (element.kind == ElementKind .METHOD ) {
9292 element as ExecutableElement
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ buildscript {
55 google()
66 }
77 dependencies {
8+ classpath ' com.android.tools.build:gradle:7.0.2'
89 classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10"
910 }
1011}
Original file line number Diff line number Diff line change 11distributionBase =GRADLE_USER_HOME
22distributionPath =wrapper/dists
3- distributionUrl =https\://services.gradle.org/distributions/gradle-6.9 -bin.zip
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-7.2 -bin.zip
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
Original file line number Diff line number Diff line change 1+ jdk :
2+ - openjdk11
3+ install :
4+ - ./gradlew publishReleasePublicationToMavenLocal
You can’t perform that action at this time.
0 commit comments