SVN以及SVN China,以及组件化

本文介绍了SVN作为版本控制系统的功能和SVN China在项目协作中的作用,详细阐述了如何利用SVN进行代码提交和更新操作。此外,文章探讨了组件化的重要性,以解决大型APP开发中遇到的复杂性和效率问题,并提到了组件化模块在Android Studio中的配置案例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

SVN以及SVN China,以及组件化

SVN介绍以及SVN China介绍

SVN是subversion的缩写,是一个开放源代码的版本控制系统,通过采用分支管理系统的高效管理,简而言之就是用于多个人共同开发同一个项目,实现共享资源,实现最终集中式的管理
SVN China相当于服务器,可以将项目提交上去,也可以通过版本库URL下载项目,修改了项目再提交(可以文件右击提交,也可以Studio里提交),下载的更新最新版本(先更新最新版本再修改提交,不然冲突)
在这里插入图片描述

组件化

为什么组件化?
随着APP版本不断的迭代,新功能的不断增加,业务也会变的越来越复杂,APP业务模块的数量有可能还会继续增加,而且每个模块的代码也变的越来越多,这样发展下去单一工程下的APP架构势必会影响开发效率,增加项目的维护成本,每个工程师都要熟悉如此之多的代码,将很难进行多人协作开发,而且Android项目在编译代码的时候电脑会非常卡,又因为单一工程下代码耦合严重,每修改一处代码后都要重新编译打包测试,导致非常耗时,最重要的是这样的代码想要做单元测试根本无从下手,所以必须要有更灵活的架构代替过去单一的工程架构。
在这里插入图片描述
组件化模块配置
Project:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0'
        
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

plugins {
    id "calces.appconfig" version "1.0.11"
}

//calces组件化配置
appConfig{
    //debug测试模式->开发阶段为true->各个子模块单独运行测试
    debugEnable false
    //组件化架构中,第三层不同业务路基组件
    apps{
        app{
            modules ':news',':user'
        }
    }
    modules{
        //新闻资讯
        news {
            name ':news'
            mainActivity ".MainActivity"
            applicationId "com.example.news"
            isRunAlone false
            //是否可以单独运行
        }
        //用户
        user {
            name ':user'
            mainActivity ".MainActivity"
            applicationId "com.example.user"
            isRunAlone false
            //是否可以单独运行
        }
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

news和user

apply plugin: 'calces.modules'

android {
    compileSdkVersion 28
    buildToolsVersion "29.0.1"


    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }

    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

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

    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值