aboutsummaryrefslogtreecommitdiff
path: root/okio/jvm/jvm.gradle
blob: cd81891e0ddec5b2038018dbf6b9ee1f2a316e8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
apply plugin: 'java-library'
apply plugin: 'ru.vyarus.animalsniffer'

kotlin.targets.matching { it.platformType.name == 'jvm' }.all { target ->
  target.project.sourceCompatibility = JavaVersion.VERSION_1_7
  target.project.targetCompatibility = JavaVersion.VERSION_1_7
  
  tasks['jvmJar'].configure { t ->
    // the bnd task convention modifies this jar task accordingly
    def bndConvention = bndBundleTaskConventionClass.newInstance(t);
    bndConvention.bnd = project.ext.bndManifest
    // call the convention when the task has finished to modify the jar to contain OSGi metadata
    t.doLast {
      bndConvention.buildBundle()
    }
  }

  target.project.animalsniffer {
    sourceSets = [target.project.sourceSets.main]
  }
  
  target.project.dependencies {
    signature 'net.sf.androidscents.signature:android-api-level-15:4.0.3_r5@signature'
    signature 'org.codehaus.mojo.signature:java17:1.0@signature'
  }
}