-
Notifications
You must be signed in to change notification settings - Fork 759
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the gradle plugin to generate the product into the package corres…
…ponding to the ApplicationId.
- Loading branch information
1 parent
c7636d2
commit 12d24f4
Showing
22 changed files
with
629 additions
and
177 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
apply plugin: rootProject.ext.plugins.javaLibrary | ||
apply plugin: plugin.javaLibrary | ||
apply from: '../publish.gradle' | ||
|
||
compileJava { | ||
sourceCompatibility = JavaVersion.VERSION_1_7 | ||
targetCompatibility = JavaVersion.VERSION_1_7 | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
version = bintray.version | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
pom.groupId = bintray.group | ||
pom.artifactId = 'annotation' | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
annotation/src/main/java/com/yanzhenjie/andserver/annotation/AppInfo.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright 2020 Zhenjie Yan. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.yanzhenjie.andserver.annotation; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Created by Zhenjie Yan on 4/11/20. | ||
*/ | ||
@Target({ElementType.TYPE}) | ||
@Retention(RetentionPolicy.SOURCE) | ||
public @interface AppInfo { | ||
|
||
/** | ||
* Application Id. | ||
*/ | ||
String value() default ""; | ||
|
||
} |
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
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,57 +1,77 @@ | ||
ext { | ||
plugins = [java : 'java', | ||
javaLibrary : 'java-library', | ||
android : 'com.android.application', | ||
androidLibrary: 'com.android.library', | ||
maven : 'com.github.dcendents.android-maven', | ||
bintray : 'com.jfrog.bintray'] | ||
|
||
android = [applicationId : 'com.yanzhenjie.andserver.sample', | ||
compileSdkVersion : 29, | ||
buildToolsVersion : '29.0.3', | ||
|
||
libraryMinSdkVersion : 9, | ||
libraryTargetSdkVersion: 29, | ||
sampleMinSdkVersion : 14, | ||
sampleTargetSdkVersion : 22, | ||
|
||
versionCode : 24, | ||
versionName : '2.1.0',] | ||
|
||
bintray = [version : '2.1.0', | ||
group : 'com.yanzhenjie.andserver', | ||
|
||
siteUrl : 'https://github.com/yanzhenjie/AndServer', | ||
gitUrl : '[email protected]:yanzhenjie/AndServer.git', | ||
|
||
packaging : 'aar', | ||
name : 'AndServer', | ||
description : 'Android web server', | ||
|
||
licenseName : 'The Apache Software License, Version 2.0', | ||
licenseUrl : 'http://www.apache.org/licenses/LICENSE-2.0.txt', | ||
|
||
developerId : 'yanzhenjie', | ||
developerName : 'yanzhenjie', | ||
developerEmail: '[email protected]', | ||
|
||
binrayLibrary : "", | ||
bintrayRepo : "maven", | ||
bintrayUser : 'yolanda', | ||
bintrayLicense: "Apache-2.0"] | ||
|
||
dependencies = [autoService : 'com.google.auto.service:auto-service:1.0-rc6', | ||
javaPoet : 'com.squareup:javapoet:1.12.1', | ||
activation : 'javax.activation:activation:1.1.1', | ||
commonsLang : 'org.apache.commons:commons-lang3:3.9', | ||
commonsCollections: 'org.apache.commons:commons-collections4:4.4', | ||
httpcore : "com.yanzhenjie.apache:httpcore:4.4.13.01", | ||
fileupload : "com.yanzhenjie.apache:fileupload:1.4", | ||
|
||
annotation : 'androidx.annotation:annotation:1.1.0', | ||
appCompat : 'androidx.appcompat:appcompat:1.1.0', | ||
design : 'com.google.android.material:material:1.1.0', | ||
|
||
loading : 'com.yanzhenjie:loading:1.0.0', | ||
json : 'com.alibaba:fastjson:1.1.71.android'] | ||
plugin = [ | ||
java : 'java', | ||
javaLibrary : 'java-library', | ||
javaPlugin : 'java-gradle-plugin', | ||
android : 'com.android.application', | ||
androidLibrary: 'com.android.library', | ||
androidMaven : 'com.github.dcendents.android-maven', | ||
bintray : 'com.jfrog.bintray', | ||
andServer : 'com.yanzhenjie.andserver' | ||
] | ||
|
||
androidBuild = [ | ||
applicationId : 'com.yanzhenjie.andserver.sample', | ||
compileSdkVersion : 29, | ||
buildToolsVersion : '29.0.3', | ||
|
||
libraryMinSdkVersion : 9, | ||
libraryTargetSdkVersion: 29, | ||
sampleMinSdkVersion : 14, | ||
sampleTargetSdkVersion : 22, | ||
|
||
versionCode : 25, | ||
versionName : '2.1.1' | ||
] | ||
|
||
bintray = [ | ||
version : '2.1.1', | ||
group : 'com.yanzhenjie.andserver', | ||
|
||
siteUrl : 'https://github.com/yanzhenjie/AndServer', | ||
gitUrl : '[email protected]:yanzhenjie/AndServer.git', | ||
|
||
packaging : 'aar', | ||
name : 'AndServer', | ||
description : 'Android web server', | ||
|
||
licenseName : 'The Apache Software License, Version 2.0', | ||
licenseUrl : 'http://www.apache.org/licenses/LICENSE-2.0.txt', | ||
|
||
developerId : 'yanzhenjie', | ||
developerName : 'yanzhenjie', | ||
developerEmail: '[email protected]', | ||
|
||
binrayLibrary : "", | ||
bintrayRepo : "maven", | ||
bintrayUser : 'yolanda', | ||
bintrayLicense: "Apache-2.0" | ||
] | ||
|
||
deps = [ | ||
android: [ | ||
plugin : 'com.android.tools.build:gradle:3.6.2', | ||
annotation: 'androidx.annotation:annotation:1.1.0', | ||
compat : 'androidx.appcompat:appcompat:1.1.0', | ||
material : 'com.google.android.material:material:1.1.0', | ||
], | ||
|
||
project: [ | ||
annotation: "${bintray.group}:annotation:${bintray.version}", | ||
api : "${bintray.group}:api:${bintray.version}", | ||
processor : "${bintray.group}:processor:${bintray.version}", | ||
plugin : "${bintray.group}:plugin:${bintray.version}" | ||
], | ||
|
||
apache : [ | ||
lang : 'org.apache.commons:commons-lang3:3.9', | ||
collections: 'org.apache.commons:commons-collections4:4.4', | ||
httpcore : "com.yanzhenjie.apache:httpcore:4.4.13.01", | ||
fileupload : "com.yanzhenjie.apache:fileupload:1.4", | ||
], | ||
|
||
poet : 'com.squareup:javapoet:1.12.1', | ||
loading: 'com.yanzhenjie:loading:1.0.0', | ||
json : 'com.alibaba:fastjson:1.1.71.android' | ||
] | ||
} |
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 @@ | ||
/build |
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,28 @@ | ||
apply plugin: plugin.javaLibrary | ||
apply plugin: plugin.javaPlugin | ||
apply from: '../publish.gradle' | ||
|
||
compileJava { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
version = bintray.version | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
pom.groupId = bintray.group | ||
pom.artifactId = 'plugin' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
|
||
compileOnly gradleApi() | ||
implementation deps.project.annotation | ||
implementation deps.android.plugin | ||
implementation deps.poet | ||
} |
Oops, something went wrong.