Skip to content

Commit 566c678

Browse files
committed
Settings for publishing to jitpack
1 parent 8a5a597 commit 566c678

6 files changed

Lines changed: 24 additions & 10 deletions

File tree

app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

2322
compileKotlin {

binco/build.gradle

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff 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-
108
sourceCompatibility = 1.8
119

1210
repositories {
@@ -18,7 +16,7 @@ kapt {
1816
}
1917

2018
sourceSets {
21-
main {
19+
named("main") {
2220
java {
2321
srcDir "${buildDir.absolutePath}/tmp/kapt/main/kotlinGenerated/"
2422
}
@@ -27,8 +25,6 @@ sourceSets {
2725

2826
dependencies {
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
}
4238
compileTestKotlin {
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
}

binco/src/main/java/com/thirdegg/binco/BincoProcessor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=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
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

jitpack.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
jdk:
2+
- openjdk11
3+
install:
4+
- ./gradlew publishReleasePublicationToMavenLocal

0 commit comments

Comments
 (0)