Skip to content

Commit

Permalink
准备 发布 1.9.2.2-incremental1
Browse files Browse the repository at this point in the history
准备 发布 1.9.2.2-incremental1
1. 解决了增量更新的问题
2. 升级基础库
  • Loading branch information
xiaojinzi123 committed Apr 15, 2023
1 parent 9436a13 commit 3cde4a0
Show file tree
Hide file tree
Showing 108 changed files with 420 additions and 447 deletions.
1 change: 0 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 23 additions & 7 deletions ComponentApi/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
apply plugin: 'java-library'
apply plugin: 'com.github.dcendents.android-maven'
plugins {
id 'java-library'
id 'org.jetbrains.kotlin.jvm'
id 'maven-publish'
}

group = 'com.github.xiaojinzi123'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

group = 'com.github.xiaojinzi123'
archivesBaseName = "component-annotation"

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}

sourceCompatibility = "8"
targetCompatibility = "8"
java {
withSourcesJar()
withJavadocJar()
}

repositories {
mavenCentral()
publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId archivesBaseName
version project.version
from components.java
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public @interface ConditionalAnno {

/**
* 指定多个条件的类,指定的这些类必须实现 {@link com.xiaojinzi.component.support.Condition} 接口
* 指定多个条件的类,指定的这些类必须实现 com.xiaojinzi.component.support.Condition 接口
* 所有都返回了 true 才表示条件成立
*/
Class[] conditions();
Expand Down
52 changes: 35 additions & 17 deletions ComponentCompiler/build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,48 @@
apply plugin: 'java-library'
apply plugin: 'com.github.dcendents.android-maven'
plugins {
id 'java-library'
id 'org.jetbrains.kotlin.jvm'
id 'maven-publish'
}

group = 'com.github.xiaojinzi123'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

group = 'com.github.xiaojinzi123'
archivesBaseName = "component-compiler"

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// 配置模块的 freeCompilerArgs 参数
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += [
"-Xjvm-default=all",
]
}
}

sourceCompatibility = "8"
targetCompatibility = "8"

dependencies {
implementation 'com.google.auto.service:auto-service:1.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.auto.service:auto-service:1.0.1'
implementation 'com.squareup:javapoet:1.13.0'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.apache.commons:commons-collections4:4.4'
implementation 'com.google.code.gson:gson:2.8.7'
if (rootProject.ext.isDependMavenOnline) {
implementation androidxLibs.component_annotation
} else {
implementation project(':ComponentApi')
}
implementation 'com.google.code.gson:gson:2.10.1'
implementation project(':ComponentApi')
}

repositories {
mavenCentral()
java {
withSourcesJar()
withJavadocJar()
}

publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId archivesBaseName
version project.version
from components.java
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,12 @@ private void createImpl(boolean isDefault) {
JavaFile
.builder(pkg, typeSpec)
.indent(" ")
.build().writeTo(mFiler);
.build()
.writeTo(mFiler);
} catch (IOException e) {
throw new ProcessException(e);
} catch (Exception e) {
// ignore
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.BiConsumer;
import java.util.function.Consumer;

import javax.annotation.processing.ProcessingEnvironment;
Expand Down Expand Up @@ -397,7 +394,7 @@ public void accept(RouterAnnoBean routerBean) {
"routerBeanMap.put(defaultScheme + $S,$N)",
"://" + routerBean.hostAndPath(), routerBeanName
);
} else {
} else {
String key = scheme + "://" + routerBean.hostAndPath();
initMapMethodSpecBuilder.addStatement("routerBeanMap.put($S,$N)", key, routerBeanName);
}
Expand Down Expand Up @@ -543,7 +540,7 @@ private void generateStaticMethodCall(RouterAnnoBean routerBean, String routerBe
// 添加一个匿名内部类
methodSpecBuilder.addStatement("$N.setCustomerIntentCall($L)", routerBeanName, intentCallTypeSpec);
} else { // 自定义跳转的
throw new ProcessException("the return type of method(" + customerIntentOrJumpPath + ") must be 'Intent' ");
throw new ProcessException("the return type of method(" + customerIntentOrJumpPath + ") must be '" + ComponentConstants.ANDROID_INTENT + "', now is " + customerReturnType.toString() + "!");
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
com.xiaojinzi.component.ModuleAppProcessor,aggregating
com.xiaojinzi.component.RouterProcessor,aggregating
com.xiaojinzi.component.RouterDegradeProcessor,aggregating
com.xiaojinzi.component.InterceptorProcessor,aggregating
com.xiaojinzi.component.ServiceProcessor,aggregating
com.xiaojinzi.component.FragmentProcessor,aggregating
com.xiaojinzi.component.AutowireProcessor,aggregating
com.xiaojinzi.component.RouterApiProcessor,aggregating
46 changes: 34 additions & 12 deletions ComponentImpl/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'

group = 'com.github.xiaojinzi123'
archivesBaseName = "component-impl"
Expand All @@ -23,27 +22,50 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = '11'
}

publishing {
singleVariant("release") {
// if you don't want sources/javadoc, remove these lines
withSourcesJar()
}
}

}

dependencies {
compileOnly androidxLibs.appcompat
if (rootProject.ext.isDependMavenOnline) {
api androidxLibs.component_annotation
}else {
api project(':ComponentApi')
}
compileOnly libs.appcompat
api project(':ComponentApi')
}

task androidSourcesJar(type: Jar) {
archiveClassifier = 'sources'
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}


artifacts {
archives androidSourcesJar
}

afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release

// You can then customize attributes of the publication as shown below.
groupId = group
artifactId = archivesBaseName
version = version
}
}
}
}
55 changes: 47 additions & 8 deletions ComponentKtImpl/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'

group = 'com.github.xiaojinzi123'

archivesBaseName = "component-impl-ktx"

android {

compileSdkVersion versions.android_compile_sdk
defaultConfig {
minSdkVersion versions.android_min_sdk
Expand All @@ -22,15 +21,55 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = '11'
}


publishing {
singleVariant("release") {
// if you don't want sources/javadoc, remove these lines
withSourcesJar()
}
}

}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compileOnly libs.kt_coroutines_core
compileOnly androidxLibs.appcompat
if (rootProject.ext.isDependMavenOnline) {
api libs.component_impl
}else {
api project(':ComponentImpl')
compileOnly libs.appcompat
api project(':ComponentImpl')
}

task androidSourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}

artifacts {
archives androidSourcesJar
}

afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release

// You can then customize attributes of the publication as shown below.
groupId = group
artifactId = archivesBaseName
version = version
}
}
}
}
33 changes: 22 additions & 11 deletions ComponentPlugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'maven-publish'

task sourceJar(type: Jar) {
archiveClassifier.set('sources')
from sourceSets.main.allJava
}

dependencies {
implementation gradleApi()
implementation localGroovy()
implementation group: 'org.ow2.asm', name: 'asm-all', version: '5.2'
implementation 'com.android.tools.build:gradle:3.3.0'
implementation 'com.google.code.gson:gson:2.8.6'
}
repositories {
mavenCentral()
implementation 'com.google.code.gson:gson:2.10.1'
}

sourceCompatibility = "8"
targetCompatibility = "8"
sourceCompatibility = "11"
targetCompatibility = "11"

group='com.xiaojinzi.component'
version="${versions.component_plugin_upload_version}"
archivesBaseName='component-plugin'
version=versions.component_plugin_upload_version

uploadArchives{
publishing {
publications {
maven(MavenPublication) {
groupId = group
artifactId = archivesBaseName
version = version
from components.java
}
}
repositories {
mavenDeployer{
repository(url: uri('../RepoComponent'))
maven {
url = "$rootDir/RepoComponent"
}
}
}
Loading

0 comments on commit 3cde4a0

Please sign in to comment.