Skip to content

Commit 77529b4

Browse files
authored
Merge pull request readdle#16 from zayass/feature/bintray
Migrate to bintray
2 parents f8a6abe + 8d583df commit 77529b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1335
-39
lines changed

bintray-publish.gradle

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
apply plugin: 'maven'
2+
apply plugin: 'maven-publish'
3+
apply plugin: 'com.jfrog.bintray'
4+
5+
task sourcesJar(type: Jar, dependsOn: classes) {
6+
classifier = 'sources'
7+
from sourceSets.main.allSource
8+
}
9+
10+
task javadocJar(type: Jar, dependsOn: javadoc) {
11+
classifier = 'javadoc'
12+
from javadoc.destinationDir
13+
}
14+
15+
artifacts {
16+
archives sourcesJar
17+
archives javadocJar
18+
}
19+
20+
publishing {
21+
publications {
22+
mavenJava(MavenPublication) {
23+
artifactId archivesBaseName
24+
from components.java
25+
artifact sourcesJar
26+
artifact javadocJar
27+
}
28+
}
29+
}
30+
31+
if (project.hasProperty("bintray_user") && project.hasProperty("bintray_api_key")) {
32+
bintray {
33+
// define this in ~/.gradle/gradle.properties
34+
user = bintray_user
35+
key = bintray_api_key
36+
37+
publish = true
38+
publications = ['mavenJava']
39+
40+
pkg {
41+
repo = 'maven'
42+
userOrg = 'readdle'
43+
name = 'swift-java-codegen'
44+
45+
desc = 'Annotation processor which can generate swift bridging code by Java annotation based mappings'
46+
vcsUrl = 'https://github.com/andriydruk/swift-java-codegen'
47+
githubRepo = 'andriydruk/swift-java-codegen'
48+
49+
licenses = ['Apache-2.0']
50+
51+
labels = ['swift', 'java', 'android']
52+
publicDownloadNumbers = true
53+
54+
attributes = ['maturity': 'Experimental']
55+
}
56+
}
57+
}

build.gradle

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
1+
buildscript {
2+
repositories {
3+
google()
4+
jcenter()
5+
maven { url "https://dl.bintray.com/readdle/maven" }
6+
}
27

3-
allprojects {
4-
version = "0.1"
8+
dependencies {
9+
classpath 'com.android.tools.build:gradle:3.0.1'
10+
classpath 'com.readdle.android.swift:swift-android-gradle:1.1.2'
11+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
12+
}
513
}
614

7-
subprojects {
8-
apply plugin: 'java'
9-
apply plugin: 'maven'
15+
subprojects { project ->
16+
group = GROUP
17+
version = VERSION_NAME
1018

11-
sourceCompatibility = 1.7 // java 7
12-
targetCompatibility = 1.7
13-
14-
task sourcesJar(type: Jar, dependsOn: classes) {
15-
classifier = 'sources'
16-
from sourceSets.main.allSource
17-
}
18-
19-
task javadocJar(type: Jar, dependsOn: javadoc) {
20-
classifier = 'javadoc'
21-
from javadoc.destinationDir
19+
repositories {
20+
google()
21+
jcenter()
22+
maven { url "https://dl.bintray.com/readdle/maven" }
2223
}
24+
}
2325

24-
artifacts {
25-
archives sourcesJar
26-
archives javadocJar
27-
}
26+
task clean(type: Delete) {
27+
delete rootProject.buildDir
2828
}

compiler/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
apply plugin: 'java'
2+
3+
archivesBaseName = "compiler"
4+
15
dependencies {
26
compile project(':library')
3-
}
7+
}
8+
9+
apply from: rootProject.file('bintray-publish.gradle')

gradle.properties

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
1-
# Project-wide Gradle settings.
1+
GROUP=com.readdle.swift.java.codegen
2+
VERSION_NAME=0.6.3
23

3-
# IDE (e.g. Android Studio) users:
4-
# Gradle settings configured through the IDE *will override*
5-
# any settings specified in this file.
6-
7-
# For more details on how to configure your build environment visit
8-
# http://www.gradle.org/docs/current/userguide/build_environment.html
9-
10-
# Specifies the JVM arguments used for the daemon process.
11-
# The setting is particularly useful for tweaking memory settings.
12-
org.gradle.jvmargs=-Xmx1536m
13-
14-
# When configured, Gradle will run in incubating parallel mode.
15-
# This option should only be used with decoupled projects. More details, visit
16-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17-
# org.gradle.parallel=true
4+
org.gradle.jvmargs=-Xmx1536m

library/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
apply plugin: 'java'
12

3+
archivesBaseName = "annotations"
4+
5+
apply from: rootProject.file('bintray-publish.gradle')

sample/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

sample/build.gradle

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'com.readdle.android.swift'
3+
4+
swift {
5+
cleanEnabled true
6+
debug {
7+
extraBuildFlags("-Xswiftc", "-DDEBUG")
8+
}
9+
}
10+
11+
android {
12+
compileSdkVersion 27
13+
defaultConfig {
14+
applicationId "com.readdle.swiftjava.sample"
15+
minSdkVersion 21
16+
targetSdkVersion 27
17+
versionCode 1
18+
versionName "1.0"
19+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
20+
}
21+
buildTypes {
22+
release {
23+
minifyEnabled false
24+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25+
}
26+
}
27+
}
28+
29+
dependencies {
30+
annotationProcessor project(':compiler')
31+
implementation project(':library')
32+
33+
implementation 'com.android.support:appcompat-v7:27.0.2'
34+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
35+
testImplementation 'junit:junit:4.12'
36+
androidTestImplementation 'com.android.support.test:runner:1.0.1'
37+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
38+
}

sample/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile

0 commit comments

Comments
 (0)